| Total Complexity | 7 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class Gif extends AFormat |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param IIMTranslations|null $lang |
||
| 19 | * @throws ImagesException |
||
| 20 | */ |
||
| 21 | 1 | public function __construct(?IIMTranslations $lang = null) |
|
| 27 | } |
||
| 28 | // @codeCoverageIgnoreEnd |
||
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function load(string $path) |
|
| 32 | { |
||
| 33 | 1 | $result = imagecreatefromgif($path); |
|
| 34 | 1 | if (false === $result) { |
|
| 35 | // @codeCoverageIgnoreStart |
||
| 36 | throw new ImagesException($this->getImLang()->imCannotCreateFromResource()); |
||
| 37 | } |
||
| 38 | // @codeCoverageIgnoreEnd |
||
| 39 | 1 | return $result; |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function save(?string $path, $resource): void |
|
| 47 | } |
||
| 48 | // @codeCoverageIgnoreEnd |
||
| 51 |