Documentation

LongToShorthandOperatorFixer extends AbstractShortOperatorFixer
in package

FinalYes

Table of Contents

Properties

$operators  : array<string, array{: int, : string}>
$operatorTypes  : array<int, string>
$tokensAnalyzer  : TokensAnalyzer

Methods

getDefinition()  : FixerDefinitionInterface
getPriority()  : int
{@inheritdoc}
isCandidate()  : bool
isRisky()  : bool
applyFix()  : void
getReplacementToken()  : Token
isOperatorTokenCandidate()  : bool

Properties

$operators

private static array<string, array{: int, : string}> $operators = ['+' => [T_PLUS_EQUAL, '+='], '-' => [T_MINUS_EQUAL, '-='], '*' => [T_MUL_EQUAL, '*='], '/' => [T_DIV_EQUAL, '/='], '&' => [T_AND_EQUAL, '&='], '.' => [T_CONCAT_EQUAL, '.='], '%' => [T_MOD_EQUAL, '%='], '|' => [T_OR_EQUAL, '|='], '^' => [T_XOR_EQUAL, '^=']]

Methods

getPriority()

{@inheritdoc}

public getPriority() : int

Must run before BinaryOperatorSpacesFixer, NoExtraBlankLinesFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, StandardizeIncrementFixer.

Return values
int

        
On this page

Search results