public function leaveNode($node)
{
if ($node instanceof Stmt\Case_ && !is_null($this->currentSwitch) && is_null($node->cond)) {
if ($this->hasDefault) {
$this->addSpot('FATAL', true, 'Switch statements cannot have multiple default blocks');
} else {
$this->hasDefault = true;
}
} elseif ($node instanceof Stmt\Switch_) {
$this->currentSwitch = null;
}
}