Pngquant2   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A optimizeCommand() 0 8 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
}