PHPSA\Analyzer\Pass\Expression\FunctionCall\DeprecatedFunctions::pass PHP Метод

pass() публичный Метод

public pass ( PhpParser\Node\Expr\FuncCall $funcCall, Context $context )
$funcCall PhpParser\Node\Expr\FuncCall
$context PHPSA\Context
    public function pass(FuncCall $funcCall, Context $context)
    {
        $functionName = $this->resolveFunctionName($funcCall, $context);
        if ($functionName) {
            if (isset($this->map[$functionName])) {
                $context->notice('deprecated.function', sprintf('%s() is deprecated since PHP %s. Use %s instead.', $functionName, $this->map[$functionName][0], $this->map[$functionName][1]), $funcCall);
            } elseif (substr($functionName, 0, 6) === 'mysql_') {
                $context->notice('deprecated.function', sprintf('The MySQL Extension is deprecated since PHP 5.5. Use PDO instead.'), $funcCall);
            } elseif (substr($functionName, 0, 7) === 'mcrypt_') {
                $context->notice('deprecated.function', sprintf('The Mcrypt Extension is deprecated since PHP 7.1. Use paragonie/halite instead.'), $funcCall);
            }
        }
    }
DeprecatedFunctions