| Total Complexity | 7 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class Jpeg extends AFormat |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param IIMTranslations|null $lang |
||
| 19 | * @throws ImagesException |
||
| 20 | */ |
||
| 21 | 11 | public function __construct(?IIMTranslations $lang = null) |
|
| 22 | { |
||
| 23 | 11 | $this->setImLang($lang); |
|
| 24 | 11 | if (!function_exists('imagecreatefromjpeg') || !function_exists('imagejpeg')) { |
|
| 25 | // @codeCoverageIgnoreStart |
||
| 26 | throw new ImagesException($this->getImLang()->imImageMagicLibNotPresent()); |
||
| 27 | } |
||
| 28 | // @codeCoverageIgnoreEnd |
||
| 29 | } |
||
| 30 | |||
| 31 | 10 | public function load(string $path) |
|
| 40 | } |
||
| 41 | |||
| 42 | 10 | public function save(?string $path, $resource): void |
|
| 51 |