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