SingleImportPerStatementFixer
extends AbstractFixer
in package
implements
WhitespacesAwareFixerInterface
Fixer for rules defined in PSR2 ¶3.
Tags
Interfaces, Classes and Traits
Table of Contents
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- fixGroupUse() : mixed
- fixMultipleUse() : mixed
- getGroupDeclaration() : array<string|int, mixed>
- getGroupStatements() : array<string|int, string>
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoLeadingImportSlashFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoUnusedImportsFixer, SpaceAfterSemicolonFixer.
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 —fixGroupUse()
private
fixGroupUse(Tokens $tokens, int $index, int $endIndex) : mixed
Parameters
- $tokens : Tokens
- $index : int
- $endIndex : int
Return values
mixed —fixMultipleUse()
private
fixMultipleUse(Tokens $tokens, int $index, int $endIndex) : mixed
Parameters
- $tokens : Tokens
- $index : int
- $endIndex : int
Return values
mixed —getGroupDeclaration()
private
getGroupDeclaration(Tokens $tokens, int $index) : array<string|int, mixed>
Parameters
- $tokens : Tokens
- $index : int
Return values
array<string|int, mixed> —getGroupStatements()
private
getGroupStatements(Tokens $tokens, string $groupPrefix, int $groupOpenIndex, int $groupCloseIndex, string $comment) : array<string|int, string>
Parameters
- $tokens : Tokens
- $groupPrefix : string
- $groupOpenIndex : int
- $groupCloseIndex : int
- $comment : string