FunctionCallSignatureSniff
extends FunctionCallSignatureSniff
in package
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
= false
$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
= ['PHP', 'JS']
Methods
isMultiLineCall()
Processes single-line calls.
public
isMultiLineCall(File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
- $phpcsFile : 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(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.
Return values
void —processMultiLineCall()
Processes multi-line calls.
public
processMultiLineCall(File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
- $phpcsFile : 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(File $phpcsFile, int $stackPtr, int $openBracket, array<string|int, mixed> $tokens) : void
Parameters
- $phpcsFile : 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>