PhpdocToPropertyTypeFixer
extends AbstractPhpdocToTypeDeclarationFixer
in package
Table of Contents
- $skippedTypes : array<string, true>
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- isSkippedType() : mixed
- findNextUntypedPropertiesDeclaration() : array<string, int>
- fixClass() : mixed
- resolveAppliableType() : mixed
Properties
$skippedTypes
private
array<string, true>
$skippedTypes
= ['mixed' => true, 'resource' => true, 'null' => true]
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before PhpdocAlignFixer. Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
Return values
mixed —isCandidate()
{@inheritdoc}
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —applyFix()
{@inheritdoc}
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
Return values
mixed —isSkippedType()
protected
isSkippedType(mixed $type) : mixed
Parameters
- $type : mixed
Return values
mixed —findNextUntypedPropertiesDeclaration()
private
findNextUntypedPropertiesDeclaration(Tokens $tokens, int $index) : array<string, int>
Parameters
- $tokens : Tokens
- $index : int
Return values
array<string, int> —fixClass()
private
fixClass(Tokens $tokens, int $index) : mixed
Parameters
- $tokens : Tokens
- $index : int
Return values
mixed —resolveAppliableType()
private
resolveAppliableType(array<string, int> $propertyIndexes, array<string|int, Annotation> $annotations) : mixed
Parameters
- $propertyIndexes : array<string, int>
- $annotations : array<string|int, Annotation>