ProtectedToPrivateFixer
extends AbstractFixer
in package
FinalYes
Tags
Table of Contents
Properties
- $tokensAnalyzer : TokensAnalyzer
Methods
- getDefinition() : FixerDefinitionInterface
- getPriority() : int
- {@inheritdoc}
- isCandidate() : bool
- applyFix() : void
- isClassCandidate() : bool
- Consider symbol as candidate for fixing if it's: - an Enum (PHP8.1+) - a class, which: - is not anonymous - is not final - does not use traits - does not extend other class.
Properties
$tokensAnalyzer
private
TokensAnalyzer
$tokensAnalyzer
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
{@inheritdoc}
public
getPriority() : int
Must run before OrderedClassElementsFixer. Must run after FinalClassFixer, FinalInternalClassFixer.
Return values
intisCandidate()
public
isCandidate(Tokens $tokens) : bool
Parameters
- $tokens : Tokens
Return values
boolapplyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : void
Parameters
- $file : SplFileInfo
- $tokens : Tokens
isClassCandidate()
Consider symbol as candidate for fixing if it's: - an Enum (PHP8.1+) - a class, which: - is not anonymous - is not final - does not use traits - does not extend other class.
private
isClassCandidate(Tokens $tokens, int $classIndex) : bool
Parameters
- $tokens : Tokens
- $classIndex : int