Class: DeprecatedFunctionsSniff
Source Location: /PHP_CodeSniffer-3.0.0RC2/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
ForbiddenFunctionsSniff
|
--DeprecatedFunctionsSniff
Discourages the use of deprecated PHP functions.
Author(s):
Copyright:
- 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
Inherited Variables
Inherited Methods
Class Details
[line
13]
Discourages the use of deprecated PHP functions.
Class Variables
$forbiddenFunctions = array()
[line 24]
A list of forbidden functions with their alternatives.
The value is NULL if no alternative exists. IE, the function should just not be used.
- Var: => string|null)
- Access: public
Method Detail
__construct (Constructor) [line 32]
DeprecatedFunctionsSniff __construct(
)
Constructor.
Uses the Reflection API to get a list of deprecated functions.
addError [line 61]
void addError(
PHP_CodeSniffer_File
$phpcsFile, int
$stackPtr, string
$function, [string
$pattern = null])
Generates the error or warning for this sniff.
Parameters:
PHP_CodeSniffer_File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the forbidden function in the token array.
string
$function
—
The name of the forbidden function.
string
$pattern
—
The pattern used for the match.
Documentation generated on 2019年3月11日 14:49:34 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.