Documentation

TernaryToNullCoalescingFixer extends AbstractFixer
in package

Tags
author

Filippo Tessarotto zoeslam@gmail.com

Table of Contents

getDefinition()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
fixIsset()  : mixed
getMeaningfulSequence()  : Tokens
Get the sequence of meaningful tokens and returns a new Tokens instance.
hasChangingContent()  : bool
Check if the `isset()` content may change if called multiple times.
isHigherPrecedenceAssociativityOperator()  : bool
Check if the requested token is an operator computed before the ternary operator along with the `isset()`.

Methods

getMeaningfulSequence()

Get the sequence of meaningful tokens and returns a new Tokens instance.

private getMeaningfulSequence(Tokens $tokens, int $start, int $end) : Tokens
Parameters
$tokens : Tokens
$start : int

start index

$end : int

end index

Return values
Tokens

hasChangingContent()

Check if the `isset()` content may change if called multiple times.

private hasChangingContent(Tokens $tokens) : bool
Parameters
$tokens : Tokens

The original token list

Return values
bool

isHigherPrecedenceAssociativityOperator()

Check if the requested token is an operator computed before the ternary operator along with the `isset()`.

private isHigherPrecedenceAssociativityOperator(Token $token) : bool
Parameters
$token : Token
Return values
bool

Search results