PhpDocTypeHelper
in package
FinalYes
Transforms a php doc type to a {@link Type} instance.
Tags
Table of Contents
Methods
- getType() : Type|null
- Creates a {@see Type} from a PHPDoc type.
- getTypes() : array<string|int, Type>
- Creates a {@see LegacyType} from a PHPDoc type.
- createLegacyType() : Type|null
- Creates a {@see LegacyType} from a PHPDoc type.
- createType() : Type|null
- Creates a {@see Type} from a PHPDoc type.
- getPhpTypeAndClass() : array<string|int, mixed>
- normalizeType() : string
Methods
getType()
Creates a {@see Type} from a PHPDoc type.
public
getType(Type $varType) : Type|null
Parameters
- $varType : Type
Return values
Type|nullgetTypes()
Creates a {@see LegacyType} from a PHPDoc type.
public
getTypes(Type $varType) : array<string|int, Type>
since Symfony 7.3, use "getType" instead
Parameters
- $varType : Type
Return values
array<string|int, Type>createLegacyType()
Creates a {@see LegacyType} from a PHPDoc type.
private
createLegacyType(Type $type, bool $nullable) : Type|null
Parameters
- $type : Type
- $nullable : bool
Return values
Type|nullcreateType()
Creates a {@see Type} from a PHPDoc type.
private
createType(Type $docType) : Type|null
Parameters
- $docType : Type
Return values
Type|nullgetPhpTypeAndClass()
private
getPhpTypeAndClass(string $docType) : array<string|int, mixed>
Parameters
- $docType : string
Return values
array<string|int, mixed>normalizeType()
private
normalizeType(string $docType) : string
Parameters
- $docType : string