original_string: protected function createTraitFile($trait)
      {
          $dir_option = rtrim(str_replace('/', '\\', $this->getDirOption()), '/\\');
          $dir_option = $dir_option ? '\\' . $dir_option : '';
          $trait = $this->configureName('trait', $trait);
  
          $stub = str_replace(
              ['{{Namespace}}', '{{TraitName}}'],
              [$this->getTraitDirectoryFromConfig() . $dir_option, $trait],
              $this->files->get(__DIR__ . '/../stubs/trait.stub')
          );
  
          $this->files->put(base_path() . '/' . $this->getTraitDirectory() . $this->getDirOption() . $trait . '.php', $stub);
      }
code: protected function createTraitFile($trait)
      {
          $dir_option = rtrim(str_replace('/', '\\', $this->getDirOption()), '/\\');
          $dir_option = $dir_option ? '\\' . $dir_option : '';
          $trait = $this->configureName('trait', $trait);
  
          $stub = str_replace(
              ['{{Namespace}}', '{{TraitName}}'],
              [$this->getTraitDirectoryFromConfig() . $dir_option, $trait],
              $this->files->get(__DIR__ . '/../stubs/trait.stub')
          );
  
          $this->files->put(base_path() . '/' . $this->getTraitDirectory() . $this->getDirOption() . $trait . '.php', $stub);
      }
code_tokens: protected function createTraitFile ( $ trait ) { $ dir_option = rtrim ( str_replace ( '/' , '\\' , $ this -> getDirOption ( ) ) , '/\\' ) ; $ dir_option = $ dir_option ? '\\' . $ dir_option : '' ; $ trait = $ this -> configureName ( 'trait' , $ trait ) ; $ stub = str_replace ( [ '{{Namespace}}' , '{{TraitName}}' ] , [ $ this -> getTraitDirectoryFromConfig ( ) . $ dir_option , $ trait ] , $ this -> files -> get ( __DIR__ . '/../stubs/trait.stub' ) ) ; $ this -> files -> put ( base_path ( ) . '/' . $ this -> getTraitDirectory ( ) . $ this -> getDirOption ( ) . $ trait . '.php' , $ stub ) ; }
docstring: Create the trait file
  
  @param  string $trait
  @return void
docstring_tokens: Create the trait file