public function leaveNode(Node $node) { parent::leaveNode($node); if ($node instanceof ClassMethod || $node instanceof Function_) { array_pop($this->currentMethod); } }
/** * {@inheritDoc} */ public function leaveNode(Node $node) { parent::leaveNode($node); if ($this->currentStructuralElement === $node) { $this->currentStructuralElement = null; } }