Documentation

PhpDocTypeHelper
in package

FinalYes

Transforms a php doc type to a {@link Type} instance.

Tags
author

Kévin Dunglas dunglas@gmail.com

author

Guilhem N. egetick@gmail.com

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

getTypes()

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

createType()

Creates a {@see Type} from a PHPDoc type.

private createType(Type $docType) : Type|null
Parameters
$docType : Type
Return values
Type|null

getPhpTypeAndClass()

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
Return values
string

        
On this page

Search results