original_string: public static function create($writerType)
      {
          $writer = null;
  
          switch ($writerType) {
              case Type::CSV:
                  $writer = new CSV\Writer();
                  break;
              case Type::XLSX:
                  $writer = new XLSX\Writer();
                  break;
              case Type::ODS:
                  $writer = new ODS\Writer();
                  break;
              default:
                  throw new UnsupportedTypeException('No writers supporting the given type: ' . $writerType);
          }
  
          $writer->setGlobalFunctionsHelper(new GlobalFunctionsHelper());
  
          return $writer;
      }
code: public static function create($writerType)
      {
          $writer = null;
  
          switch ($writerType) {
              case Type::CSV:
                  $writer = new CSV\Writer();
                  break;
              case Type::XLSX:
                  $writer = new XLSX\Writer();
                  break;
              case Type::ODS:
                  $writer = new ODS\Writer();
                  break;
              default:
                  throw new UnsupportedTypeException('No writers supporting the given type: ' . $writerType);
          }
  
          $writer->setGlobalFunctionsHelper(new GlobalFunctionsHelper());
  
          return $writer;
      }
code_tokens: public static function create ( $ writerType ) { $ writer = null ; switch ( $ writerType ) { case Type :: CSV : $ writer = new CSV \ Writer ( ) ; break ; case Type :: XLSX : $ writer = new XLSX \ Writer ( ) ; break ; case Type :: ODS : $ writer = new ODS \ Writer ( ) ; break ; default : throw new UnsupportedTypeException ( 'No writers supporting the given type: ' . $ writerType ) ; } $ writer -> setGlobalFunctionsHelper ( new GlobalFunctionsHelper ( ) ) ; return $ writer ; }
docstring: This creates an instance of the appropriate writer, given the type of the file to be read
  
  @api
  @param  string $writerType Type of the writer to instantiate
  @return WriterInterface
  @throws \Box\Spout\Common\Exception\UnsupportedTypeException
docstring_tokens: This creates an instance of the appropriate writer given the type of the file to be read