@param ResolvedFormTypeInterface $type

@return ResolvedFormTypeInterface|null
176772
private function getBuiltinFormType(ResolvedFormTypeInterface $type)
    {
        do {
            $class = get_class($type->getInnerType());

            if (FormType::class === $class) {
                return null;
            }

            if ('entity' === $type->getBlockPrefix() || 'document' === $type->getBlockPrefix()) {
                return $type;
            }

            if (0 === strpos($class, 'Symfony\Component\Form\Extension\Core\Type\\')) {
                return $type;
            }
        } while ($type = $type->getParent());

        return null;
    }
833973
public function setType(string $type = self::TYPE_HIDDEN): InputInterface
    {
        $this->type = $type;

        return $this;
    }
534262
private function getMapping(TypeInterface $type)
    {
        $type = (string) $type->getType();

        if (!isset($this->mappings[$type])) {
            throw new \InvalidArgumentException(sprintf('The mapping for type "%s" could not be found.', $type));
        }

        return $this->mappings[$type];
    }
722681
@NonNull
	public static ResolvedType resolve(@NonNull Type type, @NonNull Type... typeParameters)
	{
		return typeResolver.resolve(type, typeParameters);
	}
651344
public function getMessages($type)
    {
        return $this->hasMessages($type)
            ? $_SESSION[$this->alias][$type]
            : null;
    }
1026716
@SuppressWarnings("unchecked")
    public EntityFunction resolveType(final Class<? extends Entity> type) {
	// Check already resolved
	EntityFunction resolvedType = resolved.get(Objects.requireNonNull(type));
	if (resolvedType != null) {
	    return resolvedType;
	}

	// Log type
	logger.info(String.format("Resolving type %s", type));

	// Check not entity
	if (Entity.class.equals(type)) {
	    throw new IllegalArgumentException("Entity is not a valid Entity subclass");
	}

	// Check is interface
	if (!type.isInterface()) {
	    throw new IllegalArgumentException(String.format("Type %s is not an interface", type));
	}

	// Check type parameters
	if (type.getTypeParameters().length > 0) {
	    throw new IllegalArgumentException(String.format("Type %s cannot take type parameters", type));
	}

	// Build method map
	final Map<Method, EntityMethod> methodMap = new HashMap<>();
	final Set<Class<? extends Entity>> totalDependencies = new HashSet<>();
	for (final Method m : type.getDeclaredMethods()) {
	    // Check static
	    if (Modifier.isStatic(m.getModifiers())) {
		// Ignore static methods as not invoked on instance
		continue;
	    }
	    // Process functions
	    for (final EntityMethodFunction methodFunction : functions) {
		// Log method
		logger.fine(String.format("Resolving method %s with function %s", m, methodFunction.getClass()));
		// Resolve method
		final EntityMethod em = methodFunction.apply(m);
		if (em != null) {
		    // Resolved method
		    if (methodMap.put(m, em) != null) {
			throw new IllegalArgumentException(
				String.format("Method %s of type %s had multiple function hits", m, type));
		    }
		    // Add dependencies to be resolved
		    totalDependencies.addAll(em.getDependencies());
		}
	    }
	    // Check method could be resolved
	    if (!methodMap.containsKey(m)) {
		throw new IllegalArgumentException(String.format("Method %s of type %s had no resolver hits", m, type));
	    }
	}

	// Created resolved type
	resolvedType = new EntityFunction(type, methodMap);
	resolved.put(type, resolvedType);

	// Resolve dependencies
	totalDependencies.forEach(this::resolveType);

	// Resolve parents
	for (final Class<?> parent : type.getInterfaces()) {
	    // Ignore if entity
	    if (Entity.class.equals(parent)) {
		continue;
	    }

	    // Check if entity subclass
	    if (!Entity.class.isAssignableFrom(parent)) {
		throw new IllegalArgumentException(
			String.format("Parent type %s of type %s is not an Entity", parent, type));
	    }

	    // Resolve dependency
	    resolveType((Class<? extends Entity>) parent);
	}

	return resolvedType;
    }
613127
private function getNormalizer(TypeInterface $type)
    {
        $type = (string) $type->getType();

        if (isset($this->normalizers[$type])) {
            return $this->normalizers[$type];
        }

        return null;
    }
580477
public function converter(callable $callback, string ...$types): ResolverInterface
    {
        $rule = RuleFactory::converter($callback, ...$types);
        $this->addRule($rule, self::LOW_PRIORITY);

        return $this;
    }
956531
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        return $this->left->isSatisfiedBy($type) && $this->right->isSatisfiedBy($type);
    }
1210532
public function createFormView(FormInterface $form)
    {
        $post = $this->eavManager->initializeEntity($form->getSchema());

        $form = $this->formFactory->create(PostType::class, $post, ['form_id' => $form->getId()]);

        return $form->createView();
    }
704481
public function getResolverForResource($resource, $type = null){
		if(is_string($resource) && $resource[0] === '/'){
			$dir = dirname($resource);
			$resolver = $this->getResolverForPath($dir);
		}else{
			$resolver = $this->getResolver();
		}
		return $resolver;
	}
1208378
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        return $type->isRealType() && Types::T_NULL == $type->getDataType();
    }
666967
private function resolveDisplayType()
    {
        $type = null;

        /** Attempt display type resolution without instantiating the property, at first. */
        $metadata = $this->propertyData();
        if ($metadata) {
            if (isset($metadata['display_type'])) {
                $type = $metadata['display_type'];
            }
        }

        if ($this->propertyType || $this->property) {
            $type = $this->property()->displayType();
        }

        return $type;
    }
156022
public function resolveOptions(MetadataType $type)
    {
        return $this->getResolvedType($type)->getOptionsResolver()->resolve($type->getOptions());
    }
818447
private Type resolveType(Type beanType, Type beanType2, Type type) {
        if (type instanceof ParameterizedType) {
            if (beanType instanceof ParameterizedType) {
                return resolveParameterizedType((ParameterizedType) beanType, (ParameterizedType) type);
            }
            if (beanType instanceof Class<?>) {
                return resolveType(((Class<?>) beanType).getGenericSuperclass(), beanType2, type);
            }
        }

        if (type instanceof TypeVariable<?>) {
            if (beanType instanceof ParameterizedType) {
                return resolveTypeParameter((ParameterizedType) beanType, beanType2, (TypeVariable<?>) type);
            }
            if (beanType instanceof Class<?>) {
                return resolveType(((Class<?>) beanType).getGenericSuperclass(), beanType2, type);
            }
        }
        return type;
    }
704153
public function resolve($type)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Can not resolve class ident: type must be a string'
            );
        }

        // Normalize requested type with prefix / suffix, if applicable.
        $type = $this->prefix.$type.$this->suffix;

        $capitalizeNext = function(&$i) {
            $i = ucfirst($i);
        };

        $capitals = $this->capitals;
        foreach ($capitals as $cap) {
            $expl = explode($cap, $type);
            array_walk($expl, $capitalizeNext);
            $type = implode($cap, $expl);
        }

        $replacements = $this->replacements;
        foreach ($replacements as $rep => $target) {
            $type = str_replace($rep, $target, $type);
        }

        $class = '\\'.trim($type, '\\');

        return $class;
    }
795336
private function getConverter(TypeInterface $type)
    {
        $type = (string) $type->getType();

        if (!isset($this->converters[$type])) {
            throw new \InvalidArgumentException(sprintf('The converter for type "%s" could not be found.', $type));
        }

        return $this->converters[$type];
    }