MagicMethodCasingFixer
extends AbstractFixer
in package
Tags
Table of Contents
- $magicNames : mixed
- getDefinition() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- getMagicMethodNameInCorrectCasing() : string
- isFunctionSignature() : bool
- isMagicMethodName() : bool
- isMethodCall() : bool
- isStaticMethodCall() : bool
- setTokenToCorrectCasing() : mixed
Properties
$magicNames
private
static mixed
$magicNames
= ['__call' => '__call', '__callstatic' => '__callStatic', '__clone' => '__clone', '__construct' => '__construct', '__debuginfo' => '__debugInfo', '__destruct' => '__destruct', '__get' => '__get', '__invoke' => '__invoke', '__isset' => '__isset', '__serialize' => '__serialize', '__set' => '__set', '__set_state' => '__set_state', '__sleep' => '__sleep', '__tostring' => '__toString', '__unserialize' => '__unserialize', '__unset' => '__unset', '__wakeup' => '__wakeup']
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
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 —getMagicMethodNameInCorrectCasing()
private
getMagicMethodNameInCorrectCasing(string $name) : string
Parameters
- $name : string
-
name of a magic method
Return values
string —isFunctionSignature()
private
isFunctionSignature(Tokens $tokens, int $index) : bool
Parameters
- $tokens : Tokens
- $index : int
Return values
bool —isMagicMethodName()
private
isMagicMethodName(string $name) : bool
Parameters
- $name : string
Return values
bool —isMethodCall()
private
isMethodCall(Tokens $tokens, int $index) : bool
Parameters
- $tokens : Tokens
- $index : int
Return values
bool —isStaticMethodCall()
private
isStaticMethodCall(Tokens $tokens, int $index) : bool
Parameters
- $tokens : Tokens
- $index : int
Return values
bool —setTokenToCorrectCasing()
private
setTokenToCorrectCasing(Tokens $tokens, int $index, string $nameInCorrectCasing) : mixed
Parameters
- $tokens : Tokens
- $index : int
- $nameInCorrectCasing : string