Class: Generic_Sniffs_PHP_DeprecatedFunctionsSniff
Source Location: /PHP_CodeSniffer-2.6.0/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
Generic_Sniffs_PHP_ForbiddenFunctionsSniff
|
--Generic_Sniffs_PHP_DeprecatedFunctionsSniff
Generic_Sniffs_PHP_DeprecatedFunctionsSniff.
Author(s):
Version:
Copyright:
- 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
Inherited Variables
Inherited Methods
Class Details
[line 32]
Generic_Sniffs_PHP_DeprecatedFunctionsSniff.
Discourages the use of deprecated functions that are kept in PHP for compatibility with older versions.
Class Variables
$forbiddenFunctions = array()
[line 43]
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
Type:
array(string
Overrides:
Array
Method Detail
__construct (Constructor) [line 51]
Generic_Sniffs_PHP_DeprecatedFunctionsSniff __construct(
)
Constructor.
Uses the Reflection API to get a list of deprecated functions.
addError [line 80]
void addError(
PHP_CodeSniffer_File
$phpcsFile, int
$stackPtr, string
$function, [string
$pattern = null])
Generates the error or warning for this sniff.
Overrides
Generic_Sniffs_PHP_ForbiddenFunctionsSniff::addError() (Generates the error or warning for this sniff.)
Parameters:
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:56:09 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.