ClassKeywordRemoveFixer
extends AbstractFixer
in package
Tags
Table of Contents
- $imports : array<string|int, string>
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- makeClassFQN() : string
- replaceClassKeyword() : mixed
- replaceClassKeywordsSection() : mixed
- storeImports() : mixed
Properties
$imports
private
array<string|int, string>
$imports
= []
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before NoUnusedImportsFixer.
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 —makeClassFQN()
private
makeClassFQN(string $namespacePrefix, false|string $classImport, string $classString) : string
Parameters
- $namespacePrefix : string
- $classImport : false|string
- $classString : string
Return values
string —replaceClassKeyword()
private
replaceClassKeyword(Tokens $tokens, string $namespacePrefix, int $classIndex) : mixed
Parameters
- $tokens : Tokens
- $namespacePrefix : string
- $classIndex : int
Return values
mixed —replaceClassKeywordsSection()
private
replaceClassKeywordsSection(Tokens $tokens, string $namespace, int $startIndex, int $endIndex) : mixed
Parameters
- $tokens : Tokens
- $namespace : string
- $startIndex : int
- $endIndex : int
Return values
mixed —storeImports()
private
storeImports(Tokens $tokens, int $startIndex, int $endIndex) : mixed
Parameters
- $tokens : Tokens
- $startIndex : int
- $endIndex : int