GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 17-18 lines in 2 locations

src/Optimizers/Cwebp.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Spatie\ImageOptimizer\Image;
6
7
class Cwebp extends BaseOptimizer
8
{
9
    public $binaryName = 'cwebp';
10
11
    public function canHandle(Image $image): bool
12
    {
13
        return $image->mime() === 'image/webp';
14
    }
15
16
    public function getCommand(): string
17
    {
18
        $optionString = implode(' ', $this->options);
19
20
        return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}"
21
            .' '.escapeshellarg($this->imagePath)
22
            .' -o '.escapeshellarg($this->imagePath);
23
    }
24
}
25

src/Optimizers/Pngquant.php 1 location

@@ 7-24 (lines=18) @@
4
5
use Spatie\ImageOptimizer\Image;
6
7
class Pngquant extends BaseOptimizer
8
{
9
    public $binaryName = 'pngquant';
10
11
    public function canHandle(Image $image): bool
12
    {
13
        return $image->mime() === 'image/png';
14
    }
15
16
    public function getCommand(): string
17
    {
18
        $optionString = implode(' ', $this->options);
19
20
        return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}"
21
            .' '.escapeshellarg($this->imagePath)
22
            .' --output='.escapeshellarg($this->imagePath);
23
    }
24
}
25