| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class WebPStrategy extends TransparentStrategy implements ImageTypeStrategyInterface |
||
| 6 | {
|
||
| 7 | /** |
||
| 8 | * @param string $filename |
||
| 9 | * @return resource |
||
| 10 | */ |
||
| 11 | 2 | public function create(string $filename) |
|
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param resource $resource |
||
| 18 | * @param string $filename |
||
| 19 | * @param int $compression |
||
| 20 | * @return void |
||
| 21 | */ |
||
| 22 | 1 | public function save($resource, string $filename, int $compression = 100): void |
|
| 25 | 1 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | 1 | public function getContentType(): string |
|
| 31 | {
|
||
| 32 | 1 | return 'image/webp'; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param $resource |
||
| 37 | */ |
||
| 38 | 2 | public function render($resource): void |
|
| 43 | } |
||
| 44 | } |
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.