protected function doCreate($object, StrategyContainer $strategies, ?Context $context = null)
    {
        $docBlock = $this->createDocBlock($strategies, $object->getDocComment(), $context);

        $returnType = null;
        if ($object->getReturnType() !== null) {
            $typeResolver = new TypeResolver();
            if ($object->getReturnType() instanceof NullableType) {
                $typeString = '?' . $object->getReturnType()->type;
            } else {
                $typeString = (string) $object->getReturnType();
            }

            $returnType = $typeResolver->resolve($typeString, $context);
        }

        $method = new MethodDescriptor(
            $object->fqsen,
            $this->buildVisibility($object),
            $docBlock,
            $object->isAbstract(),
            $object->isStatic(),
            $object->isFinal(),
            new Location($object->getLine()),
            $returnType
        );

        foreach ($object->params as $param) {
            $method->addArgument($this->createMember($param, $strategies, $context));
        }

        return $method;
    }