PhpdocTrimConsecutiveBlankLineSeparationFixer
extends AbstractFixer
in package
FinalYes
Tags
Table of Contents
Methods
- getDefinition() : FixerDefinitionInterface
- getPriority() : int
- {@inheritdoc}
- isCandidate() : bool
- applyFix() : void
- findFirstAnnotationOrEnd() : int
- findNonBlankLine() : int|null
- fixAllTheRest() : void
- fixDescription() : void
- fixSummary() : void
- removeExtraBlankLine() : void
- removeExtraBlankLinesBetween() : void
- reverseFindLastUsefulContent() : int|null
Methods
getDefinition()
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
{@inheritdoc}
public
getPriority() : int
Must run before PhpdocAlignFixer. Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpUnitAttributesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
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
findFirstAnnotationOrEnd()
private
findFirstAnnotationOrEnd(DocBlock $doc) : int
Parameters
- $doc : DocBlock
Return values
intfindNonBlankLine()
private
findNonBlankLine(DocBlock $doc, int $after) : int|null
Parameters
- $doc : DocBlock
- $after : int
Return values
int|nullfixAllTheRest()
private
fixAllTheRest(DocBlock $doc) : void
Parameters
- $doc : DocBlock
fixDescription()
private
fixDescription(DocBlock $doc, int $summaryEnd) : void
Parameters
- $doc : DocBlock
- $summaryEnd : int
fixSummary()
private
fixSummary(DocBlock $doc, int $summaryEnd) : void
Parameters
- $doc : DocBlock
- $summaryEnd : int
removeExtraBlankLine()
private
removeExtraBlankLine(Line $current, Line $next) : void
Parameters
removeExtraBlankLinesBetween()
private
removeExtraBlankLinesBetween(DocBlock $doc, int $from, int $to) : void
Parameters
- $doc : DocBlock
- $from : int
- $to : int
reverseFindLastUsefulContent()
private
reverseFindLastUsefulContent(DocBlock $doc, int $from) : int|null
Parameters
- $doc : DocBlock
- $from : int