AugmentProperties
in package
Use the property context to extract useful information and inject that into the annotation.
Table of Contents
- $types : mixed
- __invoke() : mixed
- applyRef() : void
- applyType() : void
- isNullable() : bool
- stripNull() : string
Properties
$types
public
static mixed
$types
= ['array' => 'array', 'byte' => ['string', 'byte'], 'boolean' => 'boolean', 'bool' => 'boolean', 'int' => 'integer', 'integer' => 'integer', 'long' => ['integer', 'long'], 'float' => ['number', 'float'], 'double' => ['number', 'double'], 'string' => 'string', 'date' => ['string', 'date'], 'datetime' => ['string', 'date-time'], '\\datetime' => ['string', 'date-time'], 'datetimeimmutable' => ['string', 'date-time'], '\\datetimeimmutable' => ['string', 'date-time'], 'datetimeinterface' => ['string', 'date-time'], '\\datetimeinterface' => ['string', 'date-time'], 'number' => 'number', 'object' => 'object']
Methods
__invoke()
public
__invoke(Analysis $analysis) : mixed
Parameters
- $analysis : Analysis
Return values
mixed —applyRef()
protected
applyRef(Property $property, string $ref) : void
Parameters
- $property : Property
- $ref : string
Return values
void —applyType()
protected
applyType(Property $property, mixed $type) : void
Parameters
- $property : Property
- $type : mixed
Return values
void —isNullable()
protected
isNullable(string $typeDescription) : bool
Parameters
- $typeDescription : string
Return values
bool —stripNull()
protected
stripNull(string $typeDescription) : string
Parameters
- $typeDescription : string