| Methods |
| public __construct(?phpDocumentor Initializes this TypeResolver with the means to create and resolve Fqsen objects. |
| public addKeyword(string $keyword, string $typeClassName) : void Adds a keyword to the list of Keywords and associates it with a specific Value Object.
|
| public createType(?PHPStan\PhpDocParser\Ast\Type\TypeNode $type, phpDocumentor |
| public resolve(string $type, ?phpDocumentor Analyzes the given type and returns the FQCN variant. When a type is provided this method checks whether it is not a keyword or Fully Qualified Class Name. If so it will use the given namespace and aliases to expand the type to a FQCN representation. This method only works as expected if the namespace and aliases are set; no dynamic reflection is being performed here.
|
| Constants |
private phpDocumentor
|
| Properties |
private $fqsenResolver = NULL
|
private $keywords = ['string' => 'phpDocumentor\Reflection\Types\String_', 'class-string' => 'phpDocumentor\Reflection\PseudoTypes\ClassString', 'interface-string' => 'phpDocumentor\Reflection\PseudoTypes\InterfaceString', 'html-escaped-string' => 'phpDocumentor\Reflection\PseudoTypes\HtmlEscapedString', 'lowercase-string' => 'phpDocumentor\Reflection\PseudoTypes\LowercaseString', 'non-empty-lowercase-string' => 'phpDocumentor\Reflection\PseudoTypes\NonEmptyLowercaseString', 'non-empty-string' => 'phpDocumentor\Reflection\PseudoTypes\NonEmptyString', 'numeric-string' => 'phpDocumentor\Reflection\PseudoTypes\NumericString', 'numeric' => 'phpDocumentor\Reflection\PseudoTypes\Numeric_', 'trait-string' => 'phpDocumentor\Reflection\PseudoTypes\TraitString', 'enum-string' => 'phpDocumentor\Reflection\PseudoTypes\EnumString', 'int' => 'phpDocumentor\Reflection\Types\Integer', 'integer' => 'phpDocumentor\Reflection\Types\Integer', 'positive-int' => 'phpDocumentor\Reflection\PseudoTypes\PositiveInteger', 'negative-int' => 'phpDocumentor\Reflection\PseudoTypes\NegativeInteger', 'bool' => 'phpDocumentor\Reflection\Types\Boolean', 'boolean' => 'phpDocumentor\Reflection\Types\Boolean', 'real' => 'phpDocumentor\Reflection\Types\Float_', 'float' => 'phpDocumentor\Reflection\Types\Float_', 'double' => 'phpDocumentor\Reflection\Types\Float_', 'object' => 'phpDocumentor\Reflection\Types\Object_', 'mixed' => 'phpDocumentor\Reflection\Types\Mixed_', 'array' => 'phpDocumentor\Reflection\Types\Array_', 'callable-array' => 'phpDocumentor\Reflection\PseudoTypes\CallableArray', 'array-key' => 'phpDocumentor\Reflection\PseudoTypes\ArrayKey', 'non-empty-array' => 'phpDocumentor\Reflection\PseudoTypes\NonEmptyArray', 'resource' => 'phpDocumentor\Reflection\Types\Resource_', 'open-resource' => 'phpDocumentor\Reflection\PseudoTypes\OpenResource', 'closed-resource' => 'phpDocumentor\Reflection\PseudoTypes\ClosedResource', 'void' => 'phpDocumentor\Reflection\Types\Void_', 'null' => 'phpDocumentor\Reflection\Types\Null_', 'scalar' => 'phpDocumentor\Reflection\PseudoTypes\Scalar', 'callback' => 'phpDocumentor\Reflection\Types\Callable_', 'callable' => 'phpDocumentor\Reflection\Types\Callable_', 'callable-string' => 'phpDocumentor\Reflection\PseudoTypes\CallableString', 'false' => 'phpDocumentor\Reflection\PseudoTypes\False_', 'true' => 'phpDocumentor\Reflection\PseudoTypes\True_', 'literal-string' => 'phpDocumentor\Reflection\PseudoTypes\LiteralString', 'self' => 'phpDocumentor\Reflection\Types\Self_', '$this' => 'phpDocumentor\Reflection\Types\This', 'static' => 'phpDocumentor\Reflection\Types\Static_', 'parent' => 'phpDocumentor\Reflection\Types\Parent_', 'iterable' => 'phpDocumentor\Reflection\Types\Iterable_', 'never' => 'phpDocumentor\Reflection\Types\Never_', 'never-return' => 'phpDocumentor\Reflection\PseudoTypes\NeverReturn', 'never-returns' => 'phpDocumentor\Reflection\PseudoTypes\NeverReturns', 'no-return' => 'phpDocumentor\Reflection\PseudoTypes\NoReturn', 'list' => 'phpDocumentor\Reflection\PseudoTypes\List_', 'non-empty-list' => 'phpDocumentor\Reflection\PseudoTypes\NonEmptyList', 'non-falsy-string' => 'phpDocumentor\Reflection\PseudoTypes\NonFalsyString', 'truthy-string' => 'phpDocumentor\Reflection\PseudoTypes\TruthyString', 'non-positive-int' => 'phpDocumentor\Reflection\PseudoTypes\NonPositiveInteger', 'non-negative-int' => 'phpDocumentor\Reflection\PseudoTypes\NonNegativeInteger', 'non-zero-int' => 'phpDocumentor\Reflection\PseudoTypes\NonZeroInteger']
|
private $lexer = NULL
|
private $typeParser = NULL
|
| Methods |
| private createFromCallable(PHPStan\PhpDocParser\Ast\Type\CallableTypeNode $type, phpDocumentor |
| private createFromConst(PHPStan\PhpDocParser\Ast\Type\ConstTypeNode $type, phpDocumentor |
| private createFromGeneric(PHPStan\PhpDocParser\Ast\Type\GenericTypeNode $type, phpDocumentor |
private createTypesByTypeNodes(array $nodes, phpDocumentor
|
| private isFqsen(string $type) : bool Tests whether the given type is a Fully Qualified Structural Element Name.
|
| private isKeyword(string $type) : bool Detects whether the given type represents a PHPDoc keyword.
|
| private isPartialStructuralElementName(string $type) : bool Detects whether the given type represents a relative structural element name.
|
| private parse(PHPStan\PhpDocParser\Parser\TokenIterator $tokenIterator) : PHPStan\PhpDocParser\Ast\Type\TypeNode |
| private resolveKeyword(string $type) : phpDocumentor Resolves the given keyword (such as
|
| private resolveSingleType(string $type, phpDocumentor resolve the given type into a type object
|
| private resolveTypedObject(string $type, ?phpDocumentor Resolves the given FQSEN string into an FQSEN object.
|