original_string: private function generateSP(string $tableName, string $spType, string $spName): string
    {
      switch ($spType)
      {
        case 'UPDATE':
          $routine = new UpdateRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType,
                                       $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'DELETE':
          $routine = new DeleteRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType, $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'SELECT':
          $routine = new SelectRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType, $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'INSERT':
          $routine = new InsertRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType,
                                       $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        default:
          throw new FallenException("Unknown type '%s'", $spType);
      }
  
      return $routine->getCode();
    }
code: private function generateSP(string $tableName, string $spType, string $spName): string
    {
      switch ($spType)
      {
        case 'UPDATE':
          $routine = new UpdateRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType,
                                       $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'DELETE':
          $routine = new DeleteRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType, $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'SELECT':
          $routine = new SelectRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType, $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        case 'INSERT':
          $routine = new InsertRoutine($this->input,
                                       $this->output,
                                       $this->helper,
                                       $spType,
                                       $spName,
                                       $tableName,
                                       $this->dataSchema);
          break;
  
        default:
          throw new FallenException("Unknown type '%s'", $spType);
      }
  
      return $routine->getCode();
    }
code_tokens: private function generateSP ( string $ tableName , string $ spType , string $ spName ) : string { switch ( $ spType ) { case 'UPDATE' : $ routine = new UpdateRoutine ( $ this -> input , $ this -> output , $ this -> helper , $ spType , $ spName , $ tableName , $ this -> dataSchema ) ; break ; case 'DELETE' : $ routine = new DeleteRoutine ( $ this -> input , $ this -> output , $ this -> helper , $ spType , $ spName , $ tableName , $ this -> dataSchema ) ; break ; case 'SELECT' : $ routine = new SelectRoutine ( $ this -> input , $ this -> output , $ this -> helper , $ spType , $ spName , $ tableName , $ this -> dataSchema ) ; break ; case 'INSERT' : $ routine = new InsertRoutine ( $ this -> input , $ this -> output , $ this -> helper , $ spType , $ spName , $ tableName , $ this -> dataSchema ) ; break ; default : throw new FallenException ( "Unknown type '%s'" , $ spType ) ; } return $ routine -> getCode ( ) ; }
docstring: Generate code for stored routine.
  
  @param string $tableName The table name.
  @param string $spType    Stored routine type {insert|update|delete|select}.
  @param string $spName    Stored routine name.
  
  @return string
docstring_tokens: Generate code for stored routine .