RegularCallableCallFixer
extends AbstractFixer
in package
FinalYes
Tags
Table of Contents
Methods
- getDefinition() : FixerDefinitionInterface
- getPriority() : int
- {@inheritdoc}
- isCandidate() : bool
- isRisky() : bool
- applyFix() : void
- getTokensSubcollection() : Tokens
- isValidFunctionInvoke() : bool
- processCall() : void
- replaceCallUserFuncWithCallback() : void
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
{@inheritdoc}
public
getPriority() : int
Must run before NativeFunctionInvocationFixer. Must run after NoBinaryStringFixer, NoUselessConcatOperatorFixer.
Return values
intisCandidate()
public
isCandidate(Tokens $tokens) : bool
Parameters
- $tokens : Tokens
Return values
boolisRisky()
public
isRisky() : bool
Return values
boolapplyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : void
Parameters
- $file : SplFileInfo
- $tokens : Tokens
getTokensSubcollection()
private
getTokensSubcollection(Tokens $tokens, int $indexStart, int $indexEnd) : Tokens
Parameters
- $tokens : Tokens
- $indexStart : int
- $indexEnd : int
Return values
TokensisValidFunctionInvoke()
private
isValidFunctionInvoke(string $name) : bool
Parameters
- $name : string
Return values
boolprocessCall()
private
processCall(Tokens $tokens, int $index, array<string|int, mixed> $arguments) : void
Parameters
- $tokens : Tokens
- $index : int
- $arguments : array<string|int, mixed>
replaceCallUserFuncWithCallback()
private
replaceCallUserFuncWithCallback(Tokens $tokens, int $callIndex, Tokens $newCallTokens, int $firstArgStartIndex, int $firstArgEndIndex) : void