Documentation

PSR2_Sniffs_Methods_FunctionCallSignatureSniff extends PEAR_Sniffs_Functions_FunctionCallSignatureSniff
in package

PSR2_Sniffs_Methods_FunctionCallSignatureSniff.

Tags
category

PHP

author

Greg Sherwood gsherwood@squiz.net

copyright

2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)

license

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

version

Release: @package_version@

link
http://pear.php.net/package/PHP_CodeSniffer

Table of Contents

$allowMultipleArguments  : bool
If TRUE, multiple arguments can be defined per line in a multi-line call.
$indent  : int
The number of spaces code should be indented.
$requiredSpacesAfterOpen  : int
How many spaces should follow the opening bracket.
$requiredSpacesBeforeClose  : int
How many spaces should precede the closing bracket.
$supportedTokenizers  : array<string|int, mixed>
A list of tokenizers this sniff supports.
isMultiLineCall()  : void
Processes single-line calls.
process()  : void
Processes this test, when one of its tokens is encountered.
processMultiLineCall()  : void
Processes multi-line calls.
processSingleLineCall()  : void
Processes single-line calls.
register()  : array<string|int, mixed>
Returns an array of tokens this test wants to listen for.

Properties

$allowMultipleArguments

If TRUE, multiple arguments can be defined per line in a multi-line call.

public bool $allowMultipleArguments = alse

$requiredSpacesAfterOpen

How many spaces should follow the opening bracket.

public int $requiredSpacesAfterOpen = 0

$requiredSpacesBeforeClose

How many spaces should precede the closing bracket.

public int $requiredSpacesBeforeClose = 0

$supportedTokenizers

A list of tokenizers this sniff supports.

public array<string|int, mixed> $supportedTokenizers = array('PHP', 'JS')

Methods

isMultiLineCall()

Processes single-line calls.

public isMultiLineCall(PHP_CodeSniffer_File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
$phpcsFile : PHP_CodeSniffer_File

The file being scanned.

$stackPtr : int

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

$openBracket : int

The position of the opening bracket in the stack passed in $tokens.

$tokens : array<string|int, mixed>

The stack of tokens that make up the file.

Return values
void

process()

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

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

The file being scanned.

$stackPtr : int

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

Return values
void

processMultiLineCall()

Processes multi-line calls.

public processMultiLineCall(PHP_CodeSniffer_File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
$phpcsFile : PHP_CodeSniffer_File

The file being scanned.

$stackPtr : int

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

$openBracket : int

The position of the opening bracket in the stack passed in $tokens.

$tokens : array<string|int, mixed>

The stack of tokens that make up the file.

Return values
void

processSingleLineCall()

Processes single-line calls.

public processSingleLineCall(PHP_CodeSniffer_File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
$phpcsFile : PHP_CodeSniffer_File

The file being scanned.

$stackPtr : int

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

$openBracket : int

The position of the opening bracket in the stack passed in $tokens.

$tokens : array<string|int, mixed>

The stack of tokens that make up the file.

Return values
void

register()

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

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

Search results