Documentation

FunctionToConstantFixer extends AbstractFixer
in package
implements ConfigurationDefinitionFixerInterface

Tags
author

SpacePossum

Interfaces, Classes and Traits

ConfigurationDefinitionFixerInterface

Table of Contents

$availableFunctions  : array<string, array<string|int, Token>>
$functionsFixMap  : array<string, array<string|int, Token>>
__construct()  : mixed
configure()  : mixed
{@inheritdoc}
getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
isRisky()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
createConfigurationDefinition()  : mixed
{@inheritdoc}
fixFunctionCallToConstant()  : mixed
fixGetClassCall()  : null|array<string|int, mixed>
getReplaceCandidate()  : null|array<string|int, mixed>
getReplacementTokenClones()  : array<string|int, mixed>

Properties

Methods

configure()

{@inheritdoc}

public configure([array<string|int, mixed> $configuration = null ]) : mixed
Parameters
$configuration : array<string|int, mixed> = null
Return values
mixed

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before NativeFunctionCasingFixer, NoExtraBlankLinesFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer, SelfStaticAccessorFixer. Must run after NoSpacesAfterFunctionNameFixer, NoSpacesInsideParenthesisFixer.

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

fixFunctionCallToConstant()

private fixFunctionCallToConstant(Tokens $tokens, int $index, int $braceOpenIndex, int $braceCloseIndex, array<string|int, Token$replacements) : mixed
Parameters
$tokens : Tokens
$index : int
$braceOpenIndex : int
$braceCloseIndex : int
$replacements : array<string|int, Token>
Return values
mixed

fixGetClassCall()

private fixGetClassCall(Tokens $tokens, FunctionsAnalyzer $functionAnalyzer, int $index) : null|array<string|int, mixed>
Parameters
$tokens : Tokens
$functionAnalyzer : FunctionsAnalyzer
$index : int
Return values
null|array<string|int, mixed>

getReplaceCandidate()

private getReplaceCandidate(Tokens $tokens, FunctionsAnalyzer $functionAnalyzer, int $index) : null|array<string|int, mixed>
Parameters
$tokens : Tokens
$functionAnalyzer : FunctionsAnalyzer
$index : int
Return values
null|array<string|int, mixed>

getReplacementTokenClones()

private getReplacementTokenClones(string $lowerContent, int $braceOpenIndex, int $braceCloseIndex) : array<string|int, mixed>
Parameters
$lowerContent : string
$braceOpenIndex : int
$braceCloseIndex : int
Return values
array<string|int, mixed>

Search results