Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff
in package
implements
PHP_CodeSniffer_Sniff
Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff.
Ensures all calls to inbuilt PHP functions are lowercase.
Tags
Interfaces, Classes and Traits
- PHP_CodeSniffer_Sniff
- Represents a PHP_CodeSniffer sniff for sniffing coding standards.
Table of Contents
- $_builtInFunctions : array<string|int, mixed>
- String -> int hash map of all php built in function names
- __construct() : mixed
- Construct the LowercasePHPFunctionSniff
- process() : 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
$_builtInFunctions
String -> int hash map of all php built in function names
private
array<string|int, mixed>
$_builtInFunctions
Methods
__construct()
Construct the LowercasePHPFunctionSniff
public
__construct() : mixed
Return values
mixed —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 —register()
Returns an array of tokens this test wants to listen for.
public
register() : array<string|int, mixed>