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 ( 7db9c8...2633d3 )
by Freek
01:44
created

OptimizerChainFactory::create()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 27
rs 8.8571
cc 1
eloc 16
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',
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']'
Loading history...
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