public function enterNode($node) { if ($node instanceof Stmt\Switch_) { $this->currentSwitch = $node; $this->hasDefault = false; } }