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 ( 2633d3...93e4b2 )
by Freek
03:05 queued 58s
created

OptimizerChainFactory::create()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 28
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

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