InvalidConfiguration::notAnOptimizer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\LaravelImageOptimizer\Exceptions;
4
5
use Exception;
6
use Psr\Log\LoggerInterface;
7
use Spatie\ImageOptimizer\Optimizer;
8
9
class InvalidConfiguration extends Exception
10
{
11
    public static function notAnOptimizer(string $class)
12
    {
13
        $optimizerInterface = Optimizer::class;
14
15
        return new static("Configured optimizer `{$class}` does not implement `{$optimizerInterface}`.");
16
    }
17
18
    public static function notAnLogger(string $class)
19
    {
20
        $loggerInterface = LoggerInterface::class;
21
22
        return new static("Configured optimizer `{$class}` does not implement `{$loggerInterface}`.");
23
    }
24
}
25