Documentation

CommentParser extends AbstractParser
in package

Tags
extends

Table of Contents

Properties

$END_OF_LINE_CHARS  : array<string|int, non-empty-string>
$COMMENT_DELIMITER_END  : non-empty-string
$COMMENT_DELIMITER_START  : non-empty-string
$COMMENT_START_LINE_CHAR  : non-empty-string

Methods

getHandledTokenClass()  : TToken>
Get the token class that this parser handles
parseCurrentContext()  : TToken|LintError|null
Performs parsing tokenizer current context, check comment part
handleTokenForCurrentContext()  : TToken|LintError|null
lastCharIsSpace()  : bool
removeEndingString()  : string
removeStartingString()  : string
stringIsSpace()  : bool
createCommentToken()  : CommentToken
getCommentValue()  : string
handleCommentToken()  : CommentToken|null
isCommentEnd()  : bool
Check if the current char is the end of a comment
isCommentStart()  : bool
Check if the current char is the start of a comment
updateCommentToken()  : CommentToken

Properties

$END_OF_LINE_CHARS

public static array<string|int, non-empty-string> $END_OF_LINE_CHARS = ["\r\n", "\n"]

$COMMENT_DELIMITER_END

private static non-empty-string $COMMENT_DELIMITER_END = '*/'

$COMMENT_DELIMITER_START

private static non-empty-string $COMMENT_DELIMITER_START = '/*'

$COMMENT_START_LINE_CHAR

private static non-empty-string $COMMENT_START_LINE_CHAR = '*'

Methods

getHandledTokenClass()

Get the token class that this parser handles

public getHandledTokenClass() : TToken>
Return values
TToken>

parseCurrentContext()

Performs parsing tokenizer current context, check comment part

public parseCurrentContext(TokenizerContext $tokenizerContext) : TToken|LintError|null
Parameters
$tokenizerContext : TokenizerContext

The context of the tokenizer to parse.

Return values
TToken|LintError|null

A token if parsing is successful, an error if there is an issue, or null if no action is taken.

handleTokenForCurrentContext()

protected handleTokenForCurrentContext(TokenizerContext $tokenizerContext, Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 70 Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 78 callable(Array): Array $generateToken) : TToken|LintError|null
Parameters
$tokenizerContext : TokenizerContext
$generateToken : Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 70 Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 78 callable(Array): Array
Return values
TToken|LintError|null

removeEndingString()

protected static removeEndingString(string $content, string $search) : string
Parameters
$content : string
$search : string
Return values
string

removeStartingString()

protected static removeStartingString(string $content, string $search) : string
Parameters
$content : string
$search : string
Return values
string

stringIsSpace()

protected stringIsSpace(string $char) : bool
Parameters
$char : string
Return values
bool

        
On this page

Search results