for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Cecil/Cecil package.
*
* Copyright (c) Arnaud Ligny <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cecil\Step;
use Cecil\Util;
use voku\helper\HtmlMin;
* Post process HTML files.
class PostProcessHtml extends AbstractPostProcess
{
* {@inheritdoc}
public function getName(): string
return 'Post-processing HTML';
}
public function init($options)
$this->type = 'html';
parent::init($options);
public function setProcessor(): void
$this->processor = new HtmlMin();
public function processFile(\Symfony\Component\Finder\SplFileInfo $file): string
$html = Util\File::fileGetContents($file->getPathname());
return $this->processor->minify($html);
public function encode(string $content): string
return json_encode($content);
public function decode(string $content): string
return json_decode($content);