PHP Class PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer

Author: SpacePossum
Inheritance: extends PhpCsFixer\AbstractFixer
Afficher le fichier Open project: friendsofphp/php-cs-fixer

Méthodes publiques

Méthode Description
fix ( SplFileInfo $file, Tokens $tokens )
getDefinition ( )
getPriority ( )
isCandidate ( Tokens $tokens )

Private Methods

Méthode Description
clearElse ( Tokens $tokens, integer $index )
fixElse ( Tokens $tokens, integer $index )
fixEmptyElse ( Tokens $tokens, integer $index ) Remove tokens part of an else statement if not empty (i.e. no meaningful tokens inside).
getPreviousBlock ( Tokens $tokens, integer $index ) : int[] Return the first and last token index of the previous block.
isInConditional ( Tokens $tokens, integer $index, integer $lowerLimitIndex ) : boolean

Method Details

fix() public méthode

public fix ( SplFileInfo $file, Tokens $tokens )
$file SplFileInfo
$tokens PhpCsFixer\Tokenizer\Tokens

getDefinition() public méthode

public getDefinition ( )

getPriority() public méthode

public getPriority ( )

isCandidate() public méthode

public isCandidate ( Tokens $tokens )
$tokens PhpCsFixer\Tokenizer\Tokens