Documentation

PowToExponentiationFixer extends AbstractFunctionReferenceFixer
in package

Tags
author

SpacePossum

Table of Contents

getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
findPowCalls()  : array<string|int, array<string|int, mixed>>
fixPowToExponentiation()  : int
getAllowedKinds()  : array<string|int, int>
isParenthesisNeeded()  : bool

Methods

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before BinaryOperatorSpacesFixer, MethodArgumentSpaceFixer, NativeFunctionCasingFixer, NoSpacesAfterFunctionNameFixer, NoSpacesInsideParenthesisFixer.

Return values
mixed

findPowCalls()

private findPowCalls(Tokens $tokens) : array<string|int, array<string|int, mixed>>
Parameters
$tokens : Tokens
Return values
array<string|int, array<string|int, mixed>>

fixPowToExponentiation()

private fixPowToExponentiation(Tokens $tokens, int $functionNameIndex, int $openParenthesisIndex, int $closeParenthesisIndex, array<int, int> $arguments) : int
Parameters
$tokens : Tokens
$functionNameIndex : int
$openParenthesisIndex : int
$closeParenthesisIndex : int
$arguments : array<int, int>
Return values
int

number of tokens added to the collection

getAllowedKinds()

private getAllowedKinds() : array<string|int, int>
Return values
array<string|int, int>

isParenthesisNeeded()

private isParenthesisNeeded(Tokens $tokens, int $argumentStartIndex, int $argumentEndIndex) : bool
Parameters
$tokens : Tokens
$argumentStartIndex : int
$argumentEndIndex : int
Return values
bool

Search results