Documentation

NoEmptyCommentFixer extends AbstractFixer
in package

FinalYes

Table of Contents

Constants

TYPE_DOUBLE_SLASH  = 2
TYPE_HASH  = 1
TYPE_SLASH_ASTERISK  = 3

Methods

getDefinition()  : FixerDefinitionInterface
getPriority()  : int
{@inheritdoc}
isCandidate()  : bool
applyFix()  : void
getCommentBlock()  : array{blockStart: int, blockEnd: int, isEmpty: bool}
Return the start index, end index and a flag stating if the comment block is empty.
getCommentType()  : int
getLineBreakCount()  : int
isEmptyComment()  : bool

Constants

Methods

getPriority()

{@inheritdoc}

public getPriority() : int

Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer. Must run after PhpdocToCommentFixer.

Return values
int

getCommentBlock()

Return the start index, end index and a flag stating if the comment block is empty.

private getCommentBlock(Tokens $tokens, int $index) : array{blockStart: int, blockEnd: int, isEmpty: bool}
Parameters
$tokens : Tokens
$index : int

T_COMMENT index

Return values
array{blockStart: int, blockEnd: int, isEmpty: bool}

getCommentType()

private getCommentType(string $content) : int
Parameters
$content : string
Return values
int

getLineBreakCount()

private getLineBreakCount(Tokens $tokens, int $whiteStart, int $whiteEnd) : int
Parameters
$tokens : Tokens
$whiteStart : int
$whiteEnd : int
Return values
int

isEmptyComment()

private isEmptyComment(string $content) : bool
Parameters
$content : string
Return values
bool

        
On this page

Search results