PhpStanExtractor
in package
implements
PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface
FinalYes
Extracts data using PHPStan parser.
Tags
Table of Contents
Interfaces
- PropertyTypeExtractorInterface
- Type Extractor Interface.
- ConstructorArgumentTypeExtractorInterface
Constants
Properties
- $accessorPrefixes : mixed
- $arrayMutatorPrefixes : mixed
- $docBlocks : array<string, PhpDocNode|null, : int|null, : string|null, : string|null}>
- $lexer : Lexer
- $mutatorPrefixes : mixed
- $nameScopeFactory : NameScopeFactory
- $phpDocParser : PhpDocParser
- $phpStanTypeHelper : mixed
Methods
- __construct() : mixed
- getTypes() : array<string|int, Type>|null
- Gets types of a property.
- getTypesFromConstructor() : array<string|int, mixed>|null
- filterDocBlockParams() : ParamTagValueNode|null
- getDocBlock() : PhpDocNode|null, : int|null, : string|null, : string|null}
- getDocBlockFromConstructor() : ParamTagValueNode|null
- getDocBlockFromMethod() : PhpDocNode, : string, : string}|null
- getDocBlockFromProperty() : PhpDocNode, : string}|null
Constants
ACCESSOR
private
mixed
ACCESSOR
= 1
MUTATOR
private
mixed
MUTATOR
= 2
PROPERTY
private
mixed
PROPERTY
= 0
Properties
$accessorPrefixes
private
mixed
$accessorPrefixes
$arrayMutatorPrefixes
private
mixed
$arrayMutatorPrefixes
$docBlocks
private
array<string, PhpDocNode|null, : int|null, : string|null, : string|null}>
$docBlocks
= []
$lexer
private
Lexer
$lexer
$mutatorPrefixes
private
mixed
$mutatorPrefixes
$nameScopeFactory
private
NameScopeFactory
$nameScopeFactory
$phpDocParser
private
PhpDocParser
$phpDocParser
$phpStanTypeHelper
private
mixed
$phpStanTypeHelper
Methods
__construct()
public
__construct([array<int, string>|null $mutatorPrefixes = null ][, array<int, string>|null $accessorPrefixes = null ][, array<int, string>|null $arrayMutatorPrefixes = null ]) : mixed
Parameters
- $mutatorPrefixes : array<int, string>|null = null
- $accessorPrefixes : array<int, string>|null = null
- $arrayMutatorPrefixes : array<int, string>|null = null
getTypes()
Gets types of a property.
public
getTypes(string $class, string $property[, array<string|int, mixed> $context = [] ]) : array<string|int, Type>|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
array<string|int, Type>|nullgetTypesFromConstructor()
public
getTypesFromConstructor(string $class, string $property) : array<string|int, mixed>|null
Parameters
- $class : string
- $property : string
Return values
array<string|int, mixed>|nullfilterDocBlockParams()
private
filterDocBlockParams(PhpDocNode $docNode, string $allowedParam) : ParamTagValueNode|null
Parameters
- $docNode : PhpDocNode
- $allowedParam : string
Return values
ParamTagValueNode|nullgetDocBlock()
private
getDocBlock(string $class, string $property) : PhpDocNode|null, : int|null, : string|null, : string|null}
Parameters
- $class : string
- $property : string
Return values
PhpDocNode|null, : int|null, : string|null, : string|null}getDocBlockFromConstructor()
private
getDocBlockFromConstructor(string $class, string $property) : ParamTagValueNode|null
Parameters
- $class : string
- $property : string
Return values
ParamTagValueNode|nullgetDocBlockFromMethod()
private
getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type) : PhpDocNode, : string, : string}|null
Parameters
- $class : string
- $ucFirstProperty : string
- $type : int
Return values
PhpDocNode, : string, : string}|nullgetDocBlockFromProperty()
private
getDocBlockFromProperty(string $class, string $property) : PhpDocNode, : string}|null
Parameters
- $class : string
- $property : string