AnonClassDeclarationSniff
extends ClassDeclarationSniff
in package
Table of Contents
- $indent : int
- The number of spaces code should be indented.
- $functionCallSniff : FunctionCallArgumentSpacingSniff
- The Generic FunctionCallArgumentSpacing sniff.
- $multiLineSniff : MultiLineFunctionDeclarationSniff
- The PSR2 MultiLineFunctionDeclarations sniff.
- process() : void
- Processes this test, when one of its tokens is encountered.
- processClose() : void
- Processes the closing section of a class declaration.
- processMultiLineArgumentList() : void
- Processes this test, when one of its tokens is encountered.
- processOpen() : void
- Processes the opening section of a class declaration.
- processSingleLineArgumentList() : void
- Processes this test, when one of its tokens is encountered.
- register() : array<string|int, mixed>
- Returns an array of tokens this test wants to listen for.
Properties
$indent
The number of spaces code should be indented.
public
int
$indent
= 4
$functionCallSniff
The Generic FunctionCallArgumentSpacing sniff.
private
FunctionCallArgumentSpacingSniff
$functionCallSniff
= null
$multiLineSniff
The PSR2 MultiLineFunctionDeclarations sniff.
private
MultiLineFunctionDeclarationSniff
$multiLineSniff
= null
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.
Return values
void —processClose()
Processes the closing section of a class declaration.
public
processClose(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 —processMultiLineArgumentList()
Processes this test, when one of its tokens is encountered.
public
processMultiLineArgumentList(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 —processOpen()
Processes the opening section of a class declaration.
public
processOpen(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 —processSingleLineArgumentList()
Processes this test, when one of its tokens is encountered.
public
processSingleLineArgumentList(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 —register()
Returns an array of tokens this test wants to listen for.
public
register() : array<string|int, mixed>