original_string: public function registerBundle($files, $destination = null, $extension = null)
      {
          if (!is_array($files)) {
              $files = [$files];
          }
  
          $firstFile = array_values($files)[0];
  
          if ($extension === null) {
              $extension = File::extension($firstFile);
          }
  
          $extension = strtolower(trim($extension));
  
          if ($destination === null) {
              $file = File::name($firstFile);
              $path = dirname($firstFile);
              $preprocessors = array_diff(self::$cssExtensions, ['css']);
  
              if (in_array($extension, $preprocessors)) {
                  $cssPath = $path.'/../css';
                  if (
                      in_array(strtolower(basename($path)), $preprocessors) &&
                      File::isDirectory(File::symbolizePath($cssPath))
                  ) {
                      $path = $cssPath;
                  }
                  $destination = $path.'/'.$file.'.css';
              }
              else {
                  $destination = $path.'/'.$file.'-min.'.$extension;
              }
          }
  
          $this->bundles[$extension][$destination] = $files;
  
          return $this;
      }
code: public function registerBundle($files, $destination = null, $extension = null)
      {
          if (!is_array($files)) {
              $files = [$files];
          }
  
          $firstFile = array_values($files)[0];
  
          if ($extension === null) {
              $extension = File::extension($firstFile);
          }
  
          $extension = strtolower(trim($extension));
  
          if ($destination === null) {
              $file = File::name($firstFile);
              $path = dirname($firstFile);
              $preprocessors = array_diff(self::$cssExtensions, ['css']);
  
              if (in_array($extension, $preprocessors)) {
                  $cssPath = $path.'/../css';
                  if (
                      in_array(strtolower(basename($path)), $preprocessors) &&
                      File::isDirectory(File::symbolizePath($cssPath))
                  ) {
                      $path = $cssPath;
                  }
                  $destination = $path.'/'.$file.'.css';
              }
              else {
                  $destination = $path.'/'.$file.'-min.'.$extension;
              }
          }
  
          $this->bundles[$extension][$destination] = $files;
  
          return $this;
      }
code_tokens: public function registerBundle ( $ files , $ destination = null , $ extension = null ) { if ( ! is_array ( $ files ) ) { $ files = [ $ files ] ; } $ firstFile = array_values ( $ files ) [ 0 ] ; if ( $ extension === null ) { $ extension = File :: extension ( $ firstFile ) ; } $ extension = strtolower ( trim ( $ extension ) ) ; if ( $ destination === null ) { $ file = File :: name ( $ firstFile ) ; $ path = dirname ( $ firstFile ) ; $ preprocessors = array_diff ( self :: $ cssExtensions , [ 'css' ] ) ; if ( in_array ( $ extension , $ preprocessors ) ) { $ cssPath = $ path . '/../css' ; if ( in_array ( strtolower ( basename ( $ path ) ) , $ preprocessors ) && File :: isDirectory ( File :: symbolizePath ( $ cssPath ) ) ) { $ path = $ cssPath ; } $ destination = $ path . '/' . $ file . '.css' ; } else { $ destination = $ path . '/' . $ file . '-min.' . $ extension ; } } $ this -> bundles [ $ extension ] [ $ destination ] = $ files ; return $ this ; }
docstring: Registers bundle.
  @param string|array $files Files to be registered to bundle
  @param string $destination Destination file will be compiled to.
  @param string $extension Extension name. Eg: css
  @return self
docstring_tokens: Registers bundle .