SingleLineThrowFixer
extends AbstractFixer
in package
FinalYes
Tags
Table of Contents
Constants
- REMOVE_WHITESPACE_AFTER_TOKENS = ['[']
- REMOVE_WHITESPACE_AROUND_TOKENS = ['(', [T_DOUBLE_COLON]]
- REMOVE_WHITESPACE_BEFORE_TOKENS = [')', ']', ',', ';']
Methods
- getDefinition() : FixerDefinitionInterface
- getPriority() : int
- {@inheritdoc}
- isCandidate() : bool
- applyFix() : void
- isNextTokenToClear() : bool
- isPreviousTokenToClear() : bool
- trimNewLines() : void
Constants
REMOVE_WHITESPACE_AFTER_TOKENS
private
mixed
REMOVE_WHITESPACE_AFTER_TOKENS
= ['[']
REMOVE_WHITESPACE_AROUND_TOKENS
private
mixed
REMOVE_WHITESPACE_AROUND_TOKENS
= ['(', [T_DOUBLE_COLON]]
REMOVE_WHITESPACE_BEFORE_TOKENS
private
mixed
REMOVE_WHITESPACE_BEFORE_TOKENS
= [')', ']', ',', ';']
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
{@inheritdoc}
public
getPriority() : int
Must run before BracesFixer, ConcatSpaceFixer.
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
isNextTokenToClear()
private
isNextTokenToClear(Token $token) : bool
Parameters
- $token : Token
Return values
boolisPreviousTokenToClear()
private
isPreviousTokenToClear(Token $token) : bool
Parameters
- $token : Token
Return values
booltrimNewLines()
private
trimNewLines(Tokens $tokens, int $startIndex, int $endIndex) : void
Parameters
- $tokens : Tokens
- $startIndex : int
- $endIndex : int