original_string: protected function generateTransformer()
      {
          $name = (string) $this->argument('name');
          $path = $this->laravel->basePath() . '/app/Transformers/' . $name . '.php';
  
          if ($this->files->exists($path)) {
              return $this->error($name . ' already exists!');
          }
  
          $this->makeDirectory($path);
  
          $stubPath = $this->option('pivot') ? 'resources/stubs/transformer.pivot.stub' : 'resources/stubs/transformer.stub';
          $stub = $this->files->get(__DIR__ . '/../../' . $stubPath);
  
          $this->files->put($path, $this->makeTransformer($name, $stub));
  
          $this->info('Transformer created successfully.');
      }
code: protected function generateTransformer()
      {
          $name = (string) $this->argument('name');
          $path = $this->laravel->basePath() . '/app/Transformers/' . $name . '.php';
  
          if ($this->files->exists($path)) {
              return $this->error($name . ' already exists!');
          }
  
          $this->makeDirectory($path);
  
          $stubPath = $this->option('pivot') ? 'resources/stubs/transformer.pivot.stub' : 'resources/stubs/transformer.stub';
          $stub = $this->files->get(__DIR__ . '/../../' . $stubPath);
  
          $this->files->put($path, $this->makeTransformer($name, $stub));
  
          $this->info('Transformer created successfully.');
      }
code_tokens: protected function generateTransformer ( ) { $ name = ( string ) $ this -> argument ( 'name' ) ; $ path = $ this -> laravel -> basePath ( ) . '/app/Transformers/' . $ name . '.php' ; if ( $ this -> files -> exists ( $ path ) ) { return $ this -> error ( $ name . ' already exists!' ) ; } $ this -> makeDirectory ( $ path ) ; $ stubPath = $ this -> option ( 'pivot' ) ? 'resources/stubs/transformer.pivot.stub' : 'resources/stubs/transformer.stub' ; $ stub = $ this -> files -> get ( __DIR__ . '/../../' . $ stubPath ) ; $ this -> files -> put ( $ path , $ this -> makeTransformer ( $ name , $ stub ) ) ; $ this -> info ( 'Transformer created successfully.' ) ; }
docstring: Generate the transformer class.
  
  @return void
docstring_tokens: Generate the transformer class .