Documentation

OperatorLinebreakFixer extends AbstractFixer
in package
implements ConfigurationDefinitionFixerInterface

Tags
author

Kuba Werłos werlos@gmail.com

Interfaces, Classes and Traits

ConfigurationDefinitionFixerInterface

Table of Contents

$operators  : array<string|int, (int|string)[]|string>
$position  : string
configure()  : mixed
{@inheritdoc}
getDefinition()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
createConfigurationDefinition()  : mixed
{@inheritdoc}
fixMoveToTheBeginning()  : mixed
fixMoveToTheEnd()  : mixed
fixOperatorLinebreak()  : mixed
getCasesColonsForSwitch()  : array<string|int, int>
getExcludedIndices()  : array<string|int, int>
Currently only colons from "switch".
getNonBooleanOperators()  : mixed
getReplacementsAndClear()  : array<string|int, Token>
isMultiline()  : bool

Properties

Methods

configure()

{@inheritdoc}

public configure([array<string|int, mixed> $configuration = null ]) : mixed
Parameters
$configuration : array<string|int, mixed> = null
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

fixMoveToTheBeginning()

private fixMoveToTheBeginning(Tokens $tokens, array<string|int, int> $operatorIndices) : mixed
Parameters
$tokens : Tokens
$operatorIndices : array<string|int, int>
Return values
mixed

fixMoveToTheEnd()

private fixMoveToTheEnd(Tokens $tokens, array<string|int, int> $operatorIndices) : mixed
Parameters
$tokens : Tokens
$operatorIndices : array<string|int, int>
Return values
mixed

fixOperatorLinebreak()

private fixOperatorLinebreak(Tokens $tokens, array<string|int, int> $operatorIndices) : mixed
Parameters
$tokens : Tokens
$operatorIndices : array<string|int, int>
Return values
mixed

getCasesColonsForSwitch()

private getCasesColonsForSwitch(Tokens $tokens, int $switchIndex) : array<string|int, int>
Parameters
$tokens : Tokens
$switchIndex : int
Return values
array<string|int, int>

getExcludedIndices()

Currently only colons from "switch".

private getExcludedIndices(Tokens $tokens) : array<string|int, int>
Parameters
$tokens : Tokens
Return values
array<string|int, int>

getNonBooleanOperators()

private static getNonBooleanOperators() : mixed
Return values
mixed

getReplacementsAndClear()

private getReplacementsAndClear(Tokens $tokens, array<string|int, int> $indices, int $direction) : array<string|int, Token>
Parameters
$tokens : Tokens
$indices : array<string|int, int>
$direction : int
Return values
array<string|int, Token>

isMultiline()

private isMultiline(Tokens $tokens, int $indexStart, int $indexEnd) : bool
Parameters
$tokens : Tokens
$indexStart : int
$indexEnd : int
Return values
bool

Search results