Documentation

MultilineWhitespaceBeforeSemicolonsFixer extends AbstractFixer
in package
implements ConfigurationDefinitionFixerInterface, WhitespacesAwareFixerInterface

Tags
author

Graham Campbell graham@alt-three.com

author

Egidijus GirĨys e.gircys@gmail.com

Interfaces, Classes and Traits

ConfigurationDefinitionFixerInterface
WhitespacesAwareFixerInterface

Table of Contents

getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
createConfigurationDefinition()  : mixed
{@inheritdoc}
applyChainedCallsFix()  : mixed
applyNoMultiLineFix()  : mixed
findWhitespaceBeforeFirstCall()  : null|string
Checks if the semicolon closes a chained call and returns the whitespace of the first call at $index.
getIndentAt()  : null|string
getNewLineIndex()  : int
Find the index for the new line. Return the given index when there's no new line.

Methods

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before SpaceAfterSemicolonFixer. Must run after CombineConsecutiveIssetsFixer, NoEmptyStatementFixer, SingleImportPerStatementFixer.

Return values
mixed

findWhitespaceBeforeFirstCall()

Checks if the semicolon closes a chained call and returns the whitespace of the first call at $index.

private findWhitespaceBeforeFirstCall(int $index, Tokens $tokens) : null|string

i.e. it will return the whitespace marked with '____' in the example underneath.

.. ____$this->methodCall() ->anotherCall(); ..

Parameters
$index : int
$tokens : Tokens
Return values
null|string

Search results