HumHub Documentation (unofficial)

FileHeaderSniff
in package
implements Sniff

Table of Contents

Interfaces

Sniff

Methods

getHeaderLines()  : array<string|int, mixed>
Gather information about the statements inside a possible file header.
process()  : int|void
Processes this sniff when one of its tokens is encountered.
processHeaderLines()  : void
Check the spacing and grouping of the statements inside each header block.
register()  : array<string|int, int|string>
Returns an array of tokens this test wants to listen for.

Methods

getHeaderLines()

Gather information about the statements inside a possible file header.

public getHeaderLines(File $phpcsFile, int $stackPtr) : array<string|int, mixed>
Parameters
$phpcsFile : File

The file being scanned.

$stackPtr : int

The position of the current token in the stack.

Return values
array<string|int, mixed>

process()

Processes this sniff when one of its tokens is encountered.

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

The file being scanned.

$stackPtr : int

The position of the current token in the stack.

Return values
int|void

processHeaderLines()

Check the spacing and grouping of the statements inside each header block.

public processHeaderLines(File $phpcsFile, array<string|int, mixed> $headerLines) : void
Parameters
$phpcsFile : File

The file being scanned.

$headerLines : array<string|int, mixed>

Header information, as sourced from getHeaderLines().

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>

        
On this page

Search results