PHP Class PhpCsFixer\Fixer\Whitespace\NoExtraConsecutiveBlankLinesFixer

Author: Dariusz Rumiński ([email protected])
Author: SpacePossum
Inheritance: extends PhpCsFixer\AbstractFixer, implements PhpCsFixer\Fixer\ConfigurableFixerInterface, implements PhpCsFixer\Fixer\WhitespacesAwareFixerInterface
Afficher le fichier Open project: friendsofphp/php-cs-fixer

Méthodes publiques

Méthode Description
configure ( array $configuration = null ) Set configuration.
fix ( SplFileInfo $file, Tokens $tokens )
getPriority ( )
isCandidate ( Tokens $tokens )

Méthodes protégées

Méthode Description
getDescription ( )

Private Methods

Méthode Description
fixAfterToken ( $index )
fixByToken ( PhpCsFixer\Tokenizer\Token $token, $index )
fixStructureOpenCloseIfMultiLine ( integer $index ) Remove white line(s) after the index of a block type, but only if the block is not on one line.
removeBetweenUse ( $index )
removeEmptyLinesAfterLineWithTokenAt ( $index )
removeMultipleBlankLines ( $index )

Method Details

configure() public méthode

Valid configuration options are: - 'break' remove blank lines after a line with a 'break' statement - 'continue' remove blank lines after a line with a 'continue' statement - 'extra' [default] consecutive blank lines are squashed into one - 'return' remove blank lines after a line with a 'return' statement - 'throw' remove blank lines after a line with a 'throw' statement - 'use' remove blank lines between 'use' import statements - 'useTrait' remove blank lines between 'use' trait statements - 'curly_brace_block' remove blank lines after a curly opening block brace ('{') and/or end block brace ('}') - 'parenthesis_brace_block' remove blank lines after a parenthesis opening block brace ('(') and/or end block brace (')') - 'square_brace_block' remove blank lines after a square opening block brace ('[') and/or end block brace (']')
public configure ( array $configuration = null )
$configuration array

fix() public méthode

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

getDescription() protected méthode

protected getDescription ( )

getPriority() public méthode

public getPriority ( )

isCandidate() public méthode

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