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 Spatie\ImageOptimizer\OptimizerChainFactory as Optimizer;
* Post process image files.
class PostProcessImages extends AbstractPostProcess
{
* {@inheritdoc}
public function getName(): string
return 'Post-processing images';
}
public function init($options)
$this->type = 'images';
parent::init($options);
public function setProcessor(): void
$this->processor = Optimizer::create();
public function processFile(\Symfony\Component\Finder\SplFileInfo $file): string
/** @var Optimizer $processor */
$this->processor->optimize($file->getPathname());
return $file->getContents();
public function encode(string $content): string
return base64_encode($content);
public function decode(string $content): string
return base64_decode($content);