SingleTraitInsertPerStatementFixer
extends AbstractFixer
in package
Tags
Table of Contents
- getDefinition() : mixed
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- applyFix() : mixed
- fixTraitUse() : mixed
- getCandidates() : array<string|int, int>
Methods
getDefinition()
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before BracesFixer, SpaceAfterSemicolonFixer.
Return values
mixed —isCandidate()
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —applyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
Return values
mixed —fixTraitUse()
private
fixTraitUse(Tokens $tokens, int $useTraitIndex, array<string|int, int> $candidates) : mixed
Parameters
- $tokens : Tokens
- $useTraitIndex : int
- $candidates : array<string|int, int>
-
',' indexes to fix
Return values
mixed —getCandidates()
private
getCandidates(Tokens $tokens, int $index) : array<string|int, int>
Parameters
- $tokens : Tokens
- $index : int