IncludeFixer
extends AbstractFixer
in package
FinalYes
Tags
Table of Contents
Methods
- getDefinition() : FixerDefinitionInterface
- isCandidate() : bool
- applyFix() : void
- clearIncludies() : void
- findIncludies() : array<int, array{begin: int, braces: ?array{open: int, close: int}, end: int}>
- removeWhitespaceAroundIfPossible() : void
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfaceisCandidate()
public
isCandidate(Tokens $tokens) : bool
Parameters
- $tokens : Tokens
Return values
boolapplyFix()
protected
applyFix(SplFileInfo $file, Tokens $tokens) : void
Parameters
- $file : SplFileInfo
- $tokens : Tokens
clearIncludies()
private
clearIncludies(Tokens $tokens, array<int, array{begin: int, braces: ?array{open: int, close: int}, end: int}> $includies) : void
Parameters
- $tokens : Tokens
- $includies : array<int, array{begin: int, braces: ?array{open: int, close: int}, end: int}>
findIncludies()
private
findIncludies(Tokens $tokens) : array<int, array{begin: int, braces: ?array{open: int, close: int}, end: int}>
Parameters
- $tokens : Tokens
Return values
array<int, array{begin: int, braces: ?array{open: int, close: int}, end: int}>removeWhitespaceAroundIfPossible()
private
removeWhitespaceAroundIfPossible(Tokens $tokens, int $index) : void
Parameters
- $tokens : Tokens
- $index : int