HumHub Documentation (unofficial)

ClassCommentSniff extends FileCommentSniff
in package

Table of Contents

Properties

$tags  : array<string|int, mixed>
Tags in correct order and related info.

Methods

process()  : void
Processes this test, when one of its tokens is encountered.
register()  : array<string|int, int|string>
Returns an array of tokens this test wants to listen for.
processAuthor()  : void
Process the author tag(s) that this header comment has.
processCategory()  : void
Process the category tag.
processCopyright()  : void
Process the copyright tags.
processLicense()  : void
Process the license tag.
processPackage()  : void
Process the package tag.
processSubpackage()  : void
Process the subpackage tag.
processTags()  : void
Processes each required or optional tag.
processVersion()  : void
Process the version tag.

Properties

$tags

Tags in correct order and related info.

protected array<string|int, mixed> $tags = ['@category' => ['required' => true, 'allow_multiple' => false], '@package' => ['required' => true, 'allow_multiple' => false], '@subpackage' => ['required' => false, 'allow_multiple' => false], '@author' => ['required' => true, 'allow_multiple' => true], '@copyright' => ['required' => false, 'allow_multiple' => true], '@license' => ['required' => true, 'allow_multiple' => false], '@version' => ['required' => false, 'allow_multiple' => false], '@link' => ['required' => true, 'allow_multiple' => true], '@see' => ['required' => false, 'allow_multiple' => true], '@since' => ['required' => false, 'allow_multiple' => false], '@deprecated' => ['required' => false, 'allow_multiple' => false]]

Methods

process()

Processes this test, when one of its tokens is encountered.

public process(File $phpcsFile, int $stackPtr) : void
Parameters
$phpcsFile : File

The file being scanned.

$stackPtr : int

The position of the current token in the stack passed in $tokens.

register()

Returns an array of tokens this test wants to listen for.

public register() : array<string|int, int|string>
Return values
array<string|int, int|string>

processAuthor()

Process the author tag(s) that this header comment has.

protected processAuthor(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processCategory()

Process the category tag.

protected processCategory(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processCopyright()

Process the copyright tags.

protected processCopyright(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processLicense()

Process the license tag.

protected processLicense(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processPackage()

Process the package tag.

protected processPackage(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processSubpackage()

Process the subpackage tag.

protected processSubpackage(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.

processTags()

Processes each required or optional tag.

protected processTags(File $phpcsFile, int $stackPtr, int $commentStart) : void
Parameters
$phpcsFile : File

The file being scanned.

$stackPtr : int

The position of the current token in the stack passed in $tokens.

$commentStart : int

Position in the stack where the comment started.

processVersion()

Process the version tag.

protected processVersion(File $phpcsFile, array<string|int, mixed> $tags) : void
Parameters
$phpcsFile : File

The file being scanned.

$tags : array<string|int, mixed>

The tokens for these tags.


        
On this page

Search results