original_string: protected function compile($stub, $targetLocation)
      {
          $view = $this->view->make("generator.stubs::$stub", $this->context->toArray());
  
          $contents = $view->render();
  
          if($stub!='composer') {
              $contents = "<?php\r\n\r\n" . $contents;
          }
  
          $targetDir = base_path('/SocialiteProviders/src/'.$this->context->nameStudlyCase());
          if (!$this->files->isDirectory($targetDir)) {
              $this->files->makeDirectory($targetDir, 0755, true, true);
          }
  
          $this->files->put($targetDir.'/'.$targetLocation, $contents);
      }
code: protected function compile($stub, $targetLocation)
      {
          $view = $this->view->make("generator.stubs::$stub", $this->context->toArray());
  
          $contents = $view->render();
  
          if($stub!='composer') {
              $contents = "<?php\r\n\r\n" . $contents;
          }
  
          $targetDir = base_path('/SocialiteProviders/src/'.$this->context->nameStudlyCase());
          if (!$this->files->isDirectory($targetDir)) {
              $this->files->makeDirectory($targetDir, 0755, true, true);
          }
  
          $this->files->put($targetDir.'/'.$targetLocation, $contents);
      }
code_tokens: protected function compile ( $ stub , $ targetLocation ) { $ view = $ this -> view -> make ( "generator.stubs::$stub" , $ this -> context -> toArray ( ) ) ; $ contents = $ view -> render ( ) ; if ( $ stub != 'composer' ) { $ contents = "<?php\r\n\r\n" . $ contents ; } $ targetDir = base_path ( '/SocialiteProviders/src/' . $ this -> context -> nameStudlyCase ( ) ) ; if ( ! $ this -> files -> isDirectory ( $ targetDir ) ) { $ this -> files -> makeDirectory ( $ targetDir , 0755 , true , true ) ; } $ this -> files -> put ( $ targetDir . '/' . $ targetLocation , $ contents ) ; }
docstring: Generate the target file from a stub.
  
  @param $stub
  @param $targetLocation
docstring_tokens: Generate the target file from a stub .