original_string: public function renderCss($assets, $group, $attributes = [])
      {
          // temporary list of assets to pipeline
          $inline_group = false;
  
          if (array_key_exists('loading', $attributes) && $attributes['loading'] === 'inline') {
              $inline_group = true;
              unset($attributes['loading']);
          }
  
          // Store Attributes
          $this->attributes = array_merge(['type' => 'text/css', 'rel' => 'stylesheet'], $attributes);
  
          // Compute uid based on assets and timestamp
          $json_assets = json_encode($assets);
          $uid = md5($json_assets . $this->css_minify . $this->css_rewrite . $group);
          $file = $uid . '.css';
          $relative_path = "{$this->base_url}{$this->assets_url}/{$file}";
  
          $buffer = null;
  
          if (file_exists($this->assets_dir . $file)) {
              $buffer = file_get_contents($this->assets_dir . $file) . "\n";
          } else {
              //if nothing found get out of here!
              if (empty($assets)) {
                  return false;
              }
  
              // Concatenate files
              $buffer = $this->gatherLinks($assets, self::CSS_ASSET);
  
              // Minify if required
              if ($this->shouldMinify('css')) {
                  $minifier = new \MatthiasMullie\Minify\CSS();
                  $minifier->add($buffer);
                  $buffer = $minifier->minify();
              }
  
              // Write file
              if (trim($buffer) !== '') {
                  file_put_contents($this->assets_dir . $file, $buffer);
              }
          }
  
          if ($inline_group) {
              $output = "<style>\n" . $buffer . "\n</style>\n";
          } else {
              $this->asset = $relative_path;
              $output = '<link href="' . $relative_path . $this->renderQueryString() . '"' . $this->renderAttributes() . ">\n";
          }
  
          return $output;
      }
code: public function renderCss($assets, $group, $attributes = [])
      {
          // temporary list of assets to pipeline
          $inline_group = false;
  
          if (array_key_exists('loading', $attributes) && $attributes['loading'] === 'inline') {
              $inline_group = true;
              unset($attributes['loading']);
          }
  
          // Store Attributes
          $this->attributes = array_merge(['type' => 'text/css', 'rel' => 'stylesheet'], $attributes);
  
          // Compute uid based on assets and timestamp
          $json_assets = json_encode($assets);
          $uid = md5($json_assets . $this->css_minify . $this->css_rewrite . $group);
          $file = $uid . '.css';
          $relative_path = "{$this->base_url}{$this->assets_url}/{$file}";
  
          $buffer = null;
  
          if (file_exists($this->assets_dir . $file)) {
              $buffer = file_get_contents($this->assets_dir . $file) . "\n";
          } else {
              //if nothing found get out of here!
              if (empty($assets)) {
                  return false;
              }
  
              // Concatenate files
              $buffer = $this->gatherLinks($assets, self::CSS_ASSET);
  
              // Minify if required
              if ($this->shouldMinify('css')) {
                  $minifier = new \MatthiasMullie\Minify\CSS();
                  $minifier->add($buffer);
                  $buffer = $minifier->minify();
              }
  
              // Write file
              if (trim($buffer) !== '') {
                  file_put_contents($this->assets_dir . $file, $buffer);
              }
          }
  
          if ($inline_group) {
              $output = "<style>\n" . $buffer . "\n</style>\n";
          } else {
              $this->asset = $relative_path;
              $output = '<link href="' . $relative_path . $this->renderQueryString() . '"' . $this->renderAttributes() . ">\n";
          }
  
          return $output;
      }
code_tokens: public function renderCss ( $ assets , $ group , $ attributes = [ ] ) { // temporary list of assets to pipeline $ inline_group = false ; if ( array_key_exists ( 'loading' , $ attributes ) && $ attributes [ 'loading' ] === 'inline' ) { $ inline_group = true ; unset ( $ attributes [ 'loading' ] ) ; } // Store Attributes $ this -> attributes = array_merge ( [ 'type' => 'text/css' , 'rel' => 'stylesheet' ] , $ attributes ) ; // Compute uid based on assets and timestamp $ json_assets = json_encode ( $ assets ) ; $ uid = md5 ( $ json_assets . $ this -> css_minify . $ this -> css_rewrite . $ group ) ; $ file = $ uid . '.css' ; $ relative_path = "{$this->base_url}{$this->assets_url}/{$file}" ; $ buffer = null ; if ( file_exists ( $ this -> assets_dir . $ file ) ) { $ buffer = file_get_contents ( $ this -> assets_dir . $ file ) . "\n" ; } else { //if nothing found get out of here! if ( empty ( $ assets ) ) { return false ; } // Concatenate files $ buffer = $ this -> gatherLinks ( $ assets , self :: CSS_ASSET ) ; // Minify if required if ( $ this -> shouldMinify ( 'css' ) ) { $ minifier = new \ MatthiasMullie \ Minify \ CSS ( ) ; $ minifier -> add ( $ buffer ) ; $ buffer = $ minifier -> minify ( ) ; } // Write file if ( trim ( $ buffer ) !== '' ) { file_put_contents ( $ this -> assets_dir . $ file , $ buffer ) ; } } if ( $ inline_group ) { $ output = "<style>\n" . $ buffer . "\n</style>\n" ; } else { $ this -> asset = $ relative_path ; $ output = '<link href="' . $ relative_path . $ this -> renderQueryString ( ) . '"' . $ this -> renderAttributes ( ) . ">\n" ; } return $ output ; }
docstring: Minify and concatenate CSS
  
  @param array $assets
  @param string $group
  @param array $attributes
  
  @return bool|string     URL or generated content if available, else false
docstring_tokens: Minify and concatenate CSS