Documentation

SimplifiedIfReturnFixer extends AbstractFixer
in package

Tags
author

Filippo Tessarotto zoeslam@gmail.com

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

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before NoMultilineWhitespaceBeforeSemicolonsFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer. Must run after NoSuperfluousElseifFixer, NoUnneededCurlyBracesFixer, NoUselessElseFixer, SemicolonAfterInstructionFixer.

Return values
mixed

applyFix()

{@inheritdoc}

protected applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
$file : SplFileInfo
$tokens : Tokens
Return values
mixed

Search results