PHP Class Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff, PHP_CodeSniffer

Checks that the opening brace of a function is on the same line as the function declaration.
Author: Greg Sherwood ([email protected])
Author: Marc McIntyre ([email protected])
Inheritance: implements PHP_CodeSniffer_Sniff
Mostrar archivo Open project: squizlabs/php_codesniffer Class Usage Examples

Public Properties

Property Type Description
$checkClosures boolean Should this sniff check closure braces?
$checkFunctions boolean Should this sniff check function braces?

Public Methods

Method Description
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes this test, when one of its tokens is encountered.
register ( ) : void Registers the tokens that this sniff wants to listen for.

Method Details

process() public method

Processes this test, when one of its tokens is encountered.
public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
return void

register() public method

Registers the tokens that this sniff wants to listen for.
public register ( ) : void
return void

Property Details

$checkClosures public_oe property

Should this sniff check closure braces?
public bool $checkClosures
return boolean

$checkFunctions public_oe property

Should this sniff check function braces?
public bool $checkFunctions
return boolean