CombineNestedDirnameFixer
extends AbstractFixer
in package
Tags
Table of Contents
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- isRisky() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- combineDirnames() : mixed
- getDirnameInfo() : array<string|int, mixed>|bool
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before MethodArgumentSpaceFixer, NoSpacesInsideParenthesisFixer. Must run after DirConstantFixer.
Return values
mixed —isCandidate()
{@inheritdoc}
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —isRisky()
{@inheritdoc}
public
isRisky() : mixed
Return values
mixed —applyFix()
{@inheritdoc}
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
Return values
mixed —combineDirnames()
private
combineDirnames(Tokens $tokens, array<string|int, mixed> $dirnameInfoArray) : mixed
Parameters
- $tokens : Tokens
- $dirnameInfoArray : array<string|int, mixed>
Return values
mixed —getDirnameInfo()
private
getDirnameInfo(Tokens $tokens, int $index[, null|int $firstArgumentEndIndex = null ]) : array<string|int, mixed>|bool
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<string|int, mixed>|bool —false
when it is not a (supported) dirname
call, an array with info about the dirname call otherwise