function DeprecatedFunctionsSniff::__construct
Constructor.
Uses the Reflection API to get a list of deprecated functions.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Standards/ Generic/ Sniffs/ PHP/ DeprecatedFunctionsSniff.php, line 34
Class
Namespace
PHP_CodeSniffer\Standards\Generic\Sniffs\PHPCode
public function __construct() {
$functions = get_defined_functions();
foreach ($functions['internal'] as $functionName) {
$function = new ReflectionFunction($functionName);
if ($function->isDeprecated() === true) {
$this->forbiddenFunctions[$functionName] = null;
}
}
}