@param bool $minify

@return string
513731
public function generate($minify = false)
    {
        $this->eachValue($this->values);
        $this->eachValue($this->images, 'images');

        return ($minify) ? implode('', $this->html) : implode(PHP_EOL, $this->html);
    }
850678
protected function _parseMinify() {
        $this->_content = preg_replace_callback('`' . $this->_openTag . $this->_name . preg_quote($this->markup['minify'][0]) . $this->_space . $this->_closeTag . '(.*)' . $this->_openTag . '/' . $this->_name . preg_quote($this->markup['minify'][0]) . $this->_space . $this->_closeTag . '`isU', ['Gcs\Framework\Core\Template\Parser', '_parseMinifyCallback'], $this->_content);
    }
1223
public function get(string $key, bool $minified = null): ?string
    {
        if (is_null($minified)) {
            $minified = $this->minified;
        }

        return $minified ? $this->getMinified($key) : $this->getFull($key);
    }
852766
public function process(MinifyContext $context)
    {
        return $context->setContents(preg_replace_callback(
            '/
                <!          # search for the start of a comment
                    [^>]*   # search for everything without a ">"
                >           # match the end of the comment
            /xs', function ($match) {
            if (Str::contains(strtolower($match[0]), 'doctype')) {
                return $match[0];
            }

            return '';
        }, $context->getContents()));
    }
218385
private static function MinifyCSS($sStr){
            $sStr = preg_replace('!/\*.*?\*/!s','', $sStr);
            $sStr = preg_replace('/\n\s*\n/',"\n", $sStr);
            $sStr = preg_replace('/[\n\r \t]/',' ', $sStr);
            $sStr = preg_replace('/ +/',' ', $sStr);
            $sStr = preg_replace('/ ?([,:;{}]) ?/','$1',$sStr);
            $sStr = preg_replace('/;}/','}',$sStr);
            return $sStr;
        }
835720
public function setMinify($minify)
    {
        $this->pug->setKeyword('assets', $minify);
        $this->pug->setKeyword('concat', $minify);
        $this->pug->setKeyword('concat-to', $minify);
        $this->pug->setKeyword('minify', $minify);
        $this->pug->setKeyword('minify-to', $minify);
        $this->minify = $minify;

        return $this;
    }
1228697
private static function getMinifiedPackIfAllowed(string $pack_contents, object $packer_object=null) :string {
		// if we are allowed to minify
		return \Polyfony\Config::get('response','minify') ? 
			($packer_object)->add($pack_contents)->minify() : 
			$pack_contents;

	}
584387
private function optimizeScriptCode($code)
	{
		if (YII_DEBUG)
			return $code;
		require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'JSMin.php';
		$minified = JSMin::minify($code);

		return ($minified === false ? $code : $minified);
	}
240563
protected function getTmpFileFullPathByPartFilesInfo ($filesGroupInfo = [], $minify = FALSE, $extension = '') {
		return implode('', [
			$this->getTmpDir(),
			'/' . ($minify ? 'minified' : 'rendered') . '_' . $extension . '_',
			md5(implode(',', $filesGroupInfo) . '_' . $minify),
			'.' . $extension
		]);
	}
770080
public function minify($content, $type, $fileName)
    {
        if ($type == 'css') {
            $minifier = new Minify\CSS();
            $minifier->add($content);
            return $minifier->minify();
        } elseif ($type == 'js') {
            $minifier = new Minify\JS();
            $minifier->add($content);
            return $minifier->minify() . ';';
        }
        return $content;
    }
2192
function minify(src) {
       // remove comments
       src = src.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, "$1"); // Remove leading and trailing whitespace from lines

       src = src.replace(/(\\n\s+)|(\s+\\n)/g, ""); // Remove line breaks

       src = src.replace(/(\\r|\\n)+/g, ""); // Remove unnecessary whitespace

       src = src.replace(/\s*([;,[\](){}\\\/\-+*|^&!=<>?~%])\s*/g, "$1");
       return src;
     }
169502
public function process(MinifyContext $context)
    {
        $contents = preg_replace_callback(
            '/'.
                Constants::$htmlEventNamePrefix.Constants::ATTRIBUTE_NAME_REGEX.'   # Match an on{attribute}
                \s*=\s*             # Match equals sign with optional whitespaces around it
                ["\']?              # Match an optional quote
                \s*javascript:      # Match the text "javascript:" which should be removed
            /xis',
            function ($match) {
                return str_replace('javascript:', '', $match[0]);
            }, $context->getContents());

        return $context->setContents($contents);
    }
855358
public function getCssContent(string $fileName, bool $minify): string
    {
        $content = file_get_contents($fileName);

        if ($content === false) {
            throw new RuntimeException(sprintf('File could be read: %s', $fileName));
        }

        if ($minify === true) {
            $compressor = new CssMinifier();
            $content = $compressor->run($content);
        }

        return $content;
    }
1071647
public function Render ($indent = 0) {
		$actualGroupItems = & $this->_getScriptsGroupContainer($this->actualGroupName);
		if (count($actualGroupItems) === 0) return '';
		$minify = (bool)self::$globalOptions['jsMinify'];
		$joinTogether = (bool)self::$globalOptions['jsJoin'];
		if ($joinTogether) {
			$result = $this->_renderItemsTogether(
				$this->actualGroupName,
				$actualGroupItems,
				$indent,
				$minify
			);
		} else {
			$result = $this->_renderItemsSeparated(
				$this->actualGroupName,
				$actualGroupItems,
				$indent,
				$minify
			);
		}
		return $result;
	}
466696
protected function minifyAttribute($match)
    {
        if (Str::contains($match[2], $this->prohibitedChars)) {
            return $match[0];
        } elseif (preg_match('/'.Constants::PLACEHOLDER_PATTERN.'/is', $match[2])) {
            return $match[0];
        }

        return '='.$match[2];
    }
944847
public final function formatNamedDate( bool $short = false )
      : string
   {

      if ( $short )
      {
         return \sprintf(
            '%s., %s. %s %d',
            $this->getShortWeekDayName(),
            $this->getDay(),
            $this->getShortMonthName(),
            $this->getYear()
         );
      }

      return \sprintf(
         '%s, %s. %s %d',
         $this->getWeekDayName(),
         $this->getDay(),
         $this->getMonthName(),
         $this->getYear()
      );

   }
783552
function toString( $short = false )
    {
        if ( $short )
            $str = $this->Locale->formatShortDate( $this->Date );
        else
            $str = $this->Locale->formatDate( $this->Date );
        return $str;
    }