original_string: public function combineToFile($assets = [], $destination, $localPath = null)
      {
          // Disable cache always
          $this->storagePath = null;
  
          // Prefix all assets
          if ($localPath) {
              if (substr($localPath, -1) !== '/') {
                  $localPath = $localPath.'/';
              }
              $assets = array_map(function($asset) use ($localPath) {
                  if (substr($asset, 0, 1) === '@') return $asset;
                  return $localPath.$asset;
              }, $assets);
          }
  
          list($assets, $extension) = $this->prepareAssets($assets);
  
          $rewritePath = File::localToPublic(dirname($destination));
          $combiner = $this->prepareCombiner($assets, $rewritePath);
  
          $contents = $combiner->dump();
          File::put($destination, $contents);
      }
code: public function combineToFile($assets = [], $destination, $localPath = null)
      {
          // Disable cache always
          $this->storagePath = null;
  
          // Prefix all assets
          if ($localPath) {
              if (substr($localPath, -1) !== '/') {
                  $localPath = $localPath.'/';
              }
              $assets = array_map(function($asset) use ($localPath) {
                  if (substr($asset, 0, 1) === '@') return $asset;
                  return $localPath.$asset;
              }, $assets);
          }
  
          list($assets, $extension) = $this->prepareAssets($assets);
  
          $rewritePath = File::localToPublic(dirname($destination));
          $combiner = $this->prepareCombiner($assets, $rewritePath);
  
          $contents = $combiner->dump();
          File::put($destination, $contents);
      }
code_tokens: public function combineToFile ( $ assets = [ ] , $ destination , $ localPath = null ) { // Disable cache always $ this -> storagePath = null ; // Prefix all assets if ( $ localPath ) { if ( substr ( $ localPath , - 1 ) !== '/' ) { $ localPath = $ localPath . '/' ; } $ assets = array_map ( function ( $ asset ) use ( $ localPath ) { if ( substr ( $ asset , 0 , 1 ) === '@' ) return $ asset ; return $ localPath . $ asset ; } , $ assets ) ; } list ( $ assets , $ extension ) = $ this -> prepareAssets ( $ assets ) ; $ rewritePath = File :: localToPublic ( dirname ( $ destination ) ) ; $ combiner = $ this -> prepareCombiner ( $ assets , $ rewritePath ) ; $ contents = $ combiner -> dump ( ) ; File :: put ( $ destination , $ contents ) ; }
docstring: Combines a collection of assets files to a destination file
  
  $assets = [
  'assets/less/header.less',
  'assets/less/footer.less',
  ];
  
  CombineAssets::combineToFile(
  $assets,
  base_path('themes/website/assets/theme.less'),
  base_path('themes/website')
  );
  
  @param array $assets Collection of assets
  @param string $destination Write the combined file to this location
  @param string $localPath Prefix all assets with this path (optional)
  @return void
docstring_tokens: Combines a collection of assets files to a destination file