PHPCfg\Visitor\DeclarationFinder::enterOp PHP Метод

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

public enterOp ( Op $op, Block $block )
$op PHPCfg\Op
$block PHPCfg\Block
    public function enterOp(Op $op, Block $block)
    {
        if ($op instanceof Op\Stmt\Trait_) {
            $this->traits[] = $op;
        } elseif ($op instanceof Op\Stmt\Class_) {
            $this->classes[] = $op;
        } elseif ($op instanceof Op\Stmt\Interface_) {
            $this->interfaces[] = $op;
        } elseif ($op instanceof Op\Stmt\ClassMethod) {
            $this->methods[] = $op;
        } elseif ($op instanceof Op\Stmt\Function_) {
            $this->functions[] = $op;
        } elseif ($op instanceof Op\Terminal\Const_) {
            if (!isset($this->constants[$op->name->value])) {
                $this->constants[$op->name->value] = [];
            }
            $this->constants[$op->name->value][] = $op;
        }
    }