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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 6
dl 0
loc 31
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B create() 0 28 1
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