public function enterNode($node) { if ($node instanceof Stmt\Foreach_ && $node->byRef) { $this->depth++; } }