Documentation

CombineNestedDirnameFixer extends AbstractFixer
in package

FinalYes
Tags
author

Gregor Harlan

Table of Contents

Methods

getDefinition()  : FixerDefinitionInterface
getPriority()  : int
{@inheritdoc}
isCandidate()  : bool
isRisky()  : bool
applyFix()  : void
combineDirnames()  : void
getDirnameInfo()  : array{indices: list, secondArgument?: int, levels: int, end: int}|false

Methods

getPriority()

{@inheritdoc}

public getPriority() : int

Must run before MethodArgumentSpaceFixer, NoSpacesInsideParenthesisFixer, SpacesInsideParenthesesFixer. Must run after DirConstantFixer.

Return values
int

combineDirnames()

private combineDirnames(Tokens $tokens, array<int, array{indices: list, secondArgument?: int, levels: int, end: int}> $dirnameInfoArray) : void
Parameters
$tokens : Tokens
$dirnameInfoArray : array<int, array{indices: list, secondArgument?: int, levels: int, end: int}>

getDirnameInfo()

private getDirnameInfo(Tokens $tokens, int $index[, null|int $firstArgumentEndIndex = null ]) : array{indices: list, secondArgument?: int, levels: int, end: int}|false
Parameters
$tokens : Tokens
$index : int

Index of dirname

$firstArgumentEndIndex : null|int = null

Index of last token of first argument of dirname call

Return values
array{indices: list, secondArgument?: int, levels: int, end: int}|false

false when it is not a (supported) dirname call, an array with info about the dirname call otherwise


        
On this page

Search results