NativeFunctionInvocationFixer
extends AbstractFixer
in package
implements
ConfigurationDefinitionFixerInterface
Tags
Interfaces, Classes and Traits
Table of Contents
- $functionFilter : callable
- configure() : mixed
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- isRisky() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- createConfigurationDefinition() : mixed
- {@inheritdoc}
- fixFunctionCalls() : mixed
- getAllCompilerOptimizedFunctionsNormalized() : array<string, true>
- getAllInternalFunctionsNormalized() : array<string, true>
- getFunctionFilter() : callable
- normalizeFunctionNames() : array<string, true>
Properties
$functionFilter
private
callable
$functionFilter
Methods
configure()
public
configure([array<string|int, mixed> $configuration = null ]) : mixed
Parameters
- $configuration : array<string|int, mixed> = null
Return values
mixed —getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before GlobalNamespaceImportFixer. Must run after BacktickToShellExecFixer, StrictParamFixer.
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 —createConfigurationDefinition()
{@inheritdoc}
protected
createConfigurationDefinition() : mixed
Return values
mixed —fixFunctionCalls()
private
fixFunctionCalls(Tokens $tokens, callable $functionFilter, int $start, int $end, bool $tryToRemove) : mixed
Parameters
- $tokens : Tokens
- $functionFilter : callable
- $start : int
- $end : int
- $tryToRemove : bool
Return values
mixed —getAllCompilerOptimizedFunctionsNormalized()
private
getAllCompilerOptimizedFunctionsNormalized() : array<string, true>
Return values
array<string, true> —normalized function names of which the PHP compiler optimizes
getAllInternalFunctionsNormalized()
private
getAllInternalFunctionsNormalized() : array<string, true>
Return values
array<string, true> —normalized function names of all internal defined functions
getFunctionFilter()
private
getFunctionFilter() : callable
Return values
callable —normalizeFunctionNames()
private
normalizeFunctionNames(array<string|int, string> $functionNames) : array<string, true>
Parameters
- $functionNames : array<string|int, string>
Return values
array<string, true> —all function names lower cased