code: public function convert(Stmt\Switch_ $node)
      {
          $transformToIf = false;
          foreach ($node->cases as $case) {
              if (($case->cond instanceof Scalar\String_) === false && $case->cond !== null) {
                  $transformToIf = true;
              }
          }
  
          if ($transformToIf === true) {
              return $this->convertSwitchToIfelse($node);
          } else {
              return 'switch ('.$this->dispatcher->p($node->cond).') {'
               .$this->dispatcher->pStmts($node->cases)."\n".'}';
          }
      }
docs: @param Stmt\Switch_ $node
  
  @return string