TernaryOperatorSpacesFixer
extends AbstractFixer
in package
Tags
Table of Contents
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- belongsToAlternativeSyntax() : bool
- ensureWhitespaceExistence() : mixed
- getColonIndicesForSwitch() : array<string|int, int>
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run after ArraySyntaxFixer, ListSyntaxFixer, TernaryToElvisOperatorFixer.
Return values
mixed —isCandidate()
{@inheritdoc}
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —applyFix()
{@inheritdoc}
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
Return values
mixed —belongsToAlternativeSyntax()
private
belongsToAlternativeSyntax(Tokens $tokens, int $index) : bool
Parameters
- $tokens : Tokens
- $index : int
Return values
bool —ensureWhitespaceExistence()
private
ensureWhitespaceExistence(Tokens $tokens, int $index, bool $after) : mixed
Parameters
- $tokens : Tokens
- $index : int
- $after : bool
Return values
mixed —getColonIndicesForSwitch()
private
getColonIndicesForSwitch(Tokens $tokens, int $switchIndex) : array<string|int, int>
Parameters
- $tokens : Tokens
- $switchIndex : int