StandardizeIncrementFixer
extends AbstractIncrementOperatorFixer
in package
FinalYes
Tags
Table of Contents
Constants
- EXPRESSION_END_TOKENS = [';', ')', ']', ',', ':', [\PhpCsFixer\Tokenizer\CT::T_DYNAMIC_PROP_BRACE_CLOSE], [\PhpCsFixer\Tokenizer\CT::T_DYNAMIC_VAR_BRACE_CLOSE], [T_CLOSE_TAG]]
Methods
- getDefinition() : FixerDefinitionInterface
- getPriority() : int
- {@inheritdoc}
- isCandidate() : bool
- applyFix() : void
- findStart() : int
- clearRangeLeaveComments() : void
- Clear tokens in the given range unless they are comments.
Constants
EXPRESSION_END_TOKENS
private
mixed
EXPRESSION_END_TOKENS
= [';', ')', ']', ',', ':', [\PhpCsFixer\Tokenizer\CT::T_DYNAMIC_PROP_BRACE_CLOSE], [\PhpCsFixer\Tokenizer\CT::T_DYNAMIC_VAR_BRACE_CLOSE], [T_CLOSE_TAG]]
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
{@inheritdoc}
public
getPriority() : int
Must run before IncrementStyleFixer. Must run after LongToShorthandOperatorFixer.
Return values
intisCandidate()
public
isCandidate(Tokens $tokens) : bool
Parameters
- $tokens : Tokens
Return values
boolapplyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : void
Parameters
- $file : SplFileInfo
- $tokens : Tokens
findStart()
protected
final findStart(Tokens $tokens, int $index) : int
Parameters
- $tokens : Tokens
- $index : int
Return values
intclearRangeLeaveComments()
Clear tokens in the given range unless they are comments.
private
clearRangeLeaveComments(Tokens $tokens, int $indexStart, int $indexEnd) : void
Parameters
- $tokens : Tokens
- $indexStart : int
- $indexEnd : int