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.
Completed
Push — master ( a1c194...2555bb )
by Freek
01:14
created

OptimizerChainFactory::create()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
1
<?php
2
3
namespace Spatie\ImageOptimizer;
4
5
use Spatie\ImageOptimizer\Optimizers\Optipng;
6
use Spatie\ImageOptimizer\Optimizers\Gifsicle;
7
use Spatie\ImageOptimizer\Optimizers\Pngquant;
8
use Spatie\ImageOptimizer\Optimizers\Jpegoptim;
9
use Spatie\ImageOptimizer\Optimizers\Svgo;
10
11
class OptimizerChainFactory
12
{
13
    public static function create(): OptimizerChain
14
    {
15
        return (new OptimizerChain())
16
            ->addOptimizer(new Jpegoptim([
17
                '--strip-all',
18
                '--all-progressive',
19
            ]))
20
21
            ->addOptimizer(new Pngquant([
22
                '--force',
23
            ]))
24
25
            ->addOptimizer(new Optipng([
26
                '-i0',
27
                '-o2',
28
                '-quiet',
29
            ]))
30
31
            ->addOptimizer(new Svgo())
32
33
            ->addOptimizer(new Gifsicle([
34
                '-b',
35
                '-O5',
36
            ]));
37
    }
38
}
39