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 ( 73bff3...74d293 )
by Freek
01:19
created

OptimizerChainFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 23 1
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
10
class OptimizerChainFactory
11
{
12
    public static function create(): OptimizerChain
13
    {
14
        return (new OptimizerChain())
15
            ->addOptimizer(new Jpegoptim([
16
                '--strip-all',
17
                '--all-progressive',
18
            ]))
19
20
            ->addOptimizer(new Pngquant([
21
                '--force',
22
            ]))
23
24
            ->addOptimizer(new Optipng([
25
                '-i0',
26
                '-o2',
27
                '-quiet',
28
            ]))
29
30
            ->addOptimizer(new Gifsicle([
31
                '-b',
32
                '-O5',
33
            ]));
34
    }
35
}
36