PSR2_Sniffs_Methods_FunctionCallSignatureSniff
extends PEAR_Sniffs_Functions_FunctionCallSignatureSniff
in package
PSR2_Sniffs_Methods_FunctionCallSignatureSniff.
Tags
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
$indent
The number of spaces code should be indented.
public
int
$indent
= 4
$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>