NoBreakCommentFixer
extends AbstractFixer
in package
implements
ConfigurationDefinitionFixerInterface, WhitespacesAwareFixerInterface
Fixer for rule defined in PSR2 ΒΆ5.2.
Interfaces, Classes and Traits
Table of Contents
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- createConfigurationDefinition() : mixed
- {@inheritdoc}
- ensureNewLineAt() : int
- fixCase() : mixed
- getStructureEnd() : int
- insertCommentAt() : mixed
- isNoBreakComment() : bool
- removeComment() : mixed
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run after NoUselessElseFixer.
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 —createConfigurationDefinition()
{@inheritdoc}
protected
createConfigurationDefinition() : mixed
Return values
mixed —ensureNewLineAt()
private
ensureNewLineAt(Tokens $tokens, int $position) : int
Parameters
- $tokens : Tokens
- $position : int
Return values
int —The newline token position
fixCase()
private
fixCase(Tokens $tokens, int $casePosition) : mixed
Parameters
- $tokens : Tokens
- $casePosition : int
Return values
mixed —getStructureEnd()
private
getStructureEnd(Tokens $tokens, int $position) : int
Parameters
- $tokens : Tokens
- $position : int
Return values
int —insertCommentAt()
private
insertCommentAt(Tokens $tokens, int $casePosition) : mixed
Parameters
- $tokens : Tokens
- $casePosition : int
Return values
mixed —isNoBreakComment()
private
isNoBreakComment(Token $token) : bool
Parameters
- $token : Token
Return values
bool —removeComment()
private
removeComment(Tokens $tokens, int $commentPosition) : mixed
Parameters
- $tokens : Tokens
- $commentPosition : int