| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function supportsFormat(string $format): bool { |
||
| 27 | if (is_null($this->imagick)) { |
||
| 28 | return false; |
||
| 29 | } |
||
| 30 | |||
| 31 | $cached = $this->cache->get($format); |
||
| 32 | if (!is_null($cached)) { |
||
| 33 | return $cached; |
||
| 34 | } |
||
| 35 | |||
| 36 | $formatSupported = count($this->imagick->queryFormats($format)) === 1; |
||
| 37 | $this->cache->set($format, $cached); |
||
| 38 | return $formatSupported; |
||
| 39 | } |
||
| 41 |