Documentation

PhpStanExtractor
in package
implements PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface

FinalYes

Extracts data using PHPStan parser.

Tags
author

Baptiste Leduc baptiste.leduc@gmail.com

Table of Contents

Interfaces

PropertyTypeExtractorInterface
Type Extractor Interface.
ConstructorArgumentTypeExtractorInterface

Constants

ACCESSOR  = 1
MUTATOR  = 2
PROPERTY  = 0

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

Properties

$docBlocks

private array<string, PhpDocNode|null, : int|null, : string|null, : string|null}> $docBlocks = []

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>|null

getTypesFromConstructor()

public getTypesFromConstructor(string $class, string $property) : array<string|int, mixed>|null
Parameters
$class : string
$property : string
Return values
array<string|int, mixed>|null

getDocBlock()

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}

getDocBlockFromMethod()

private getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type) : PhpDocNode, : string, : string}|null
Parameters
$class : string
$ucFirstProperty : string
$type : int
Return values
PhpDocNode, : string, : string}|null

getDocBlockFromProperty()

private getDocBlockFromProperty(string $class, string $property) : PhpDocNode, : string}|null
Parameters
$class : string
$property : string
Return values
PhpDocNode, : string}|null

        
On this page

Search results