Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function __invoke(ContainerInterface $container): ImagineInterface |
||
20 | { |
||
21 | if (class_exists('Gmagick')) { |
||
22 | return new \Imagine\Gmagick\Imagine(); |
||
23 | } |
||
24 | |||
25 | if (class_exists('Imagick')) { |
||
26 | return new \Imagine\Imagick\Imagine(); |
||
27 | } |
||
28 | |||
29 | throw new \Exception('Gmagick and Imagick are missing, install one of those module'); |
||
30 | } |
||
32 |