SimplifiedIfReturnFixer
extends AbstractFixer
in package
Tags
Table of Contents
- $sequences : mixed
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
Properties
$sequences
private
mixed
$sequences
= [['isNegative' => false, 'sequence' => ['{', [T_RETURN], [T_STRING, 'true'], ';', '}', [T_RETURN], [T_STRING, 'false'], ';']], ['isNegative' => true, 'sequence' => ['{', [T_RETURN], [T_STRING, 'false'], ';', '}', [T_RETURN], [T_STRING, 'true'], ';']], ['isNegative' => false, 'sequence' => [[T_RETURN], [T_STRING, 'true'], ';', [T_RETURN], [T_STRING, 'false'], ';']], ['isNegative' => true, 'sequence' => [[T_RETURN], [T_STRING, 'false'], ';', [T_RETURN], [T_STRING, 'true'], ';']]]
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before NoMultilineWhitespaceBeforeSemicolonsFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer. Must run after NoSuperfluousElseifFixer, NoUnneededCurlyBracesFixer, NoUselessElseFixer, SemicolonAfterInstructionFixer.
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