Pngquant2::optimizeCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Rvdlee\ZfImageOptimiser\Adapter;
4
5
use Rvdlee\ZfImageOptimiser\Model\Image;
6
7
class Pngquant2 extends AbstractImageOptimiser
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $binaryPath = 'pngquant';
13
14
    public function optimizeCommand(Image $image) : string
15
    {
16
        /** @var array $binaryOptions */
17
        $binaryOptions = $this->getBinaryOptions();
18
        $binaryOptions[] = sprintf('-o %s', $image->getPath());
19
        $this->setBinaryOptions($binaryOptions);
20
21
        return parent::optimizeCommand($image);
22
    }
23
}