NoEmptyCommentFixer
extends AbstractFixer
in package
Tags
Table of Contents
- TYPE_DOUBLE_SLASH = 2
- TYPE_HASH = 1
- TYPE_SLASH_ASTERISK = 3
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- getCommentBlock() : array<string|int, mixed>
- Return the start index, end index and a flag stating if the comment block is empty.
- getCommentType() : int
- getLineBreakCount() : int
- isEmptyComment() : bool
Constants
TYPE_DOUBLE_SLASH
public
mixed
TYPE_DOUBLE_SLASH
= 2
TYPE_HASH
public
mixed
TYPE_HASH
= 1
TYPE_SLASH_ASTERISK
public
mixed
TYPE_SLASH_ASTERISK
= 3
Methods
getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer. Must run after PhpdocToCommentFixer.
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 —getCommentBlock()
Return the start index, end index and a flag stating if the comment block is empty.
private
getCommentBlock(Tokens $tokens, int $index) : array<string|int, mixed>
Parameters
- $tokens : Tokens
- $index : int
-
T_COMMENT index
Return values
array<string|int, mixed> —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