PHPSA\Analyzer\Pass\Expression\ExitUsage::pass PHP Method

pass() public method

public pass ( PhpParser\Node\Expr\Exit_ $expr, Context $context ) : boolean
$expr PhpParser\Node\Expr\Exit_
$context PHPSA\Context
return boolean
    public function pass(Expr\Exit_ $expr, Context $context)
    {
        $context->notice('exit_usage', 'exit/die statements make the code hard to test and should not be used', $expr);
        return true;
    }