PowToExponentiationFixer
extends AbstractFunctionReferenceFixer
in package
Tags
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
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before BinaryOperatorSpacesFixer, MethodArgumentSpaceFixer, NativeFunctionCasingFixer, NoSpacesAfterFunctionNameFixer, NoSpacesInsideParenthesisFixer.
Return values
mixed —isCandidate()
{@inheritdoc}
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —applyFix()
{@inheritdoc}
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
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