NoUnneededCurlyBracesFixer
extends AbstractFixer
in package
implements
ConfigurationDefinitionFixerInterface
Tags
Interfaces, Classes and Traits
Table of Contents
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- createConfigurationDefinition() : mixed
- {@inheritdoc}
- clearIfIsOverCompleteNamespaceBlock() : mixed
- clearOverCompleteBraces() : mixed
- findCurlyBraceOpen() : mixed
- isOverComplete() : bool
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before NoUselessElseFixer, NoUselessReturnFixer, ReturnAssignmentFixer, SimplifiedIfReturnFixer.
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 —createConfigurationDefinition()
{@inheritdoc}
protected
createConfigurationDefinition() : mixed
Return values
mixed —clearIfIsOverCompleteNamespaceBlock()
private
clearIfIsOverCompleteNamespaceBlock(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —clearOverCompleteBraces()
private
clearOverCompleteBraces(Tokens $tokens, int $openIndex, int $closeIndex) : mixed
Parameters
- $tokens : Tokens
- $openIndex : int
-
index of
{
token - $closeIndex : int
-
index of
}
token
Return values
mixed —findCurlyBraceOpen()
private
findCurlyBraceOpen(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —isOverComplete()
private
isOverComplete(Tokens $tokens, int $index) : bool
Parameters
- $tokens : Tokens
- $index : int
-
index of
{
token