| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public static function get(string $type): ImagineInterface |
||
| 29 | { |
||
| 30 | switch ($type) { |
||
| 31 | case self::GD: |
||
| 32 | return new GdImagine(); |
||
| 33 | case self::IMAGICK: |
||
| 34 | return new ImagickImagine(); |
||
| 35 | case self::GMAGICK: |
||
| 36 | return new GmagickImagine(); |
||
| 37 | default: |
||
| 38 | throw new InvalidConfigException(sprintf('Image driver %s not found.', $type)); |
||
| 39 | } |
||
| 41 | } |