original_string: protected function generate()
      {
          foreach ($this->listFiles as $key => $file) {
              $filePath = $this->makeFilePath($this->listFolders[$key], $this->data['name']);
  
              $this->resolveByPath($filePath);
  
              $file = $this->formatContent($file);
  
              //
              $find = basename($filePath);
  
              $filePath = strrev(preg_replace(strrev("/$find/"), '', strrev($filePath), 1));
  
              $filePath = $filePath .$file;
  
              if ($this->files->exists($filePath)) {
                  return $this->error($this->type .' already exists!');
              }
  
              $this->makeDirectory($filePath);
  
              foreach ($this->signOption as $option) {
                  if ($this->option($option)) {
                      $stubFile = $this->listStubs[$option][$key];
  
                      $this->resolveByOption($this->option($option));
  
                      break;
                  }
              }
  
              if (! isset($stubFile)) {
                  $stubFile = $this->listStubs['default'][$key];
              }
  
              $this->files->put($filePath, $this->getStubContent($stubFile));
          }
  
          return $this->info($this->type.' created successfully.');
      }
code: protected function generate()
      {
          foreach ($this->listFiles as $key => $file) {
              $filePath = $this->makeFilePath($this->listFolders[$key], $this->data['name']);
  
              $this->resolveByPath($filePath);
  
              $file = $this->formatContent($file);
  
              //
              $find = basename($filePath);
  
              $filePath = strrev(preg_replace(strrev("/$find/"), '', strrev($filePath), 1));
  
              $filePath = $filePath .$file;
  
              if ($this->files->exists($filePath)) {
                  return $this->error($this->type .' already exists!');
              }
  
              $this->makeDirectory($filePath);
  
              foreach ($this->signOption as $option) {
                  if ($this->option($option)) {
                      $stubFile = $this->listStubs[$option][$key];
  
                      $this->resolveByOption($this->option($option));
  
                      break;
                  }
              }
  
              if (! isset($stubFile)) {
                  $stubFile = $this->listStubs['default'][$key];
              }
  
              $this->files->put($filePath, $this->getStubContent($stubFile));
          }
  
          return $this->info($this->type.' created successfully.');
      }
code_tokens: protected function generate ( ) { foreach ( $ this -> listFiles as $ key => $ file ) { $ filePath = $ this -> makeFilePath ( $ this -> listFolders [ $ key ] , $ this -> data [ 'name' ] ) ; $ this -> resolveByPath ( $ filePath ) ; $ file = $ this -> formatContent ( $ file ) ; // $ find = basename ( $ filePath ) ; $ filePath = strrev ( preg_replace ( strrev ( "/$find/" ) , '' , strrev ( $ filePath ) , 1 ) ) ; $ filePath = $ filePath . $ file ; if ( $ this -> files -> exists ( $ filePath ) ) { return $ this -> error ( $ this -> type . ' already exists!' ) ; } $ this -> makeDirectory ( $ filePath ) ; foreach ( $ this -> signOption as $ option ) { if ( $ this -> option ( $ option ) ) { $ stubFile = $ this -> listStubs [ $ option ] [ $ key ] ; $ this -> resolveByOption ( $ this -> option ( $ option ) ) ; break ; } } if ( ! isset ( $ stubFile ) ) { $ stubFile = $ this -> listStubs [ 'default' ] [ $ key ] ; } $ this -> files -> put ( $ filePath , $ this -> getStubContent ( $ stubFile ) ) ; } return $ this -> info ( $ this -> type . ' created successfully.' ) ; }
docstring: generate the console command.
  
  @return mixed
docstring_tokens: generate the console command .