| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class IMagickSupport { |
||
| 9 | private ICache $cache; |
||
| 10 | private ?\Imagick $imagick; |
||
| 11 | |||
| 12 | public function __construct(ICacheFactory $cacheFactory) { |
||
| 13 | $this->cache = $cacheFactory->createLocal('imagick'); |
||
| 14 | |||
| 15 | if (extension_loaded('imagick')) { |
||
| 16 | $this->imagick = new \Imagick(); |
||
| 17 | } else { |
||
| 18 | $this->imagick = null; |
||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | public function hasExtension(): bool { |
||
| 24 | } |
||
| 25 | |||
| 26 | public function supportsFormat(string $format): bool { |
||
| 39 | } |
||
| 40 | } |
||
| 41 |