PHPSA\Analyzer\Pass\Statement\UnexpectedUseOfThis::pass PHP Method

pass() public method

public pass ( PhpParser\Node\Stmt $stmt, Context $context ) : boolean
$stmt PhpParser\Node\Stmt
$context PHPSA\Context
return boolean
    public function pass(Node\Stmt $stmt, Context $context)
    {
        if ($stmt instanceof Stmt\ClassMethod || $stmt instanceof Stmt\Function_) {
            return $this->inspectParams($stmt, $context);
        } elseif ($stmt instanceof Stmt\TryCatch) {
            return $this->inspectTryCatch($stmt, $context);
        } elseif ($stmt instanceof Stmt\Foreach_) {
            return $this->inspectForeach($stmt, $context);
        } elseif ($stmt instanceof Stmt\Static_) {
            return $this->inspectStaticVar($stmt, $context);
        } elseif ($stmt instanceof Stmt\Global_) {
            return $this->inspectGlobalVar($stmt, $context);
        } elseif ($stmt instanceof Stmt\Unset_) {
            return $this->inspectUnset($stmt, $context);
        }
        return false;
    }