Conditions | 4 |
Paths | 8 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function apply(ImageInterface $image): ImageInterface |
||
29 | { |
||
30 | // transparent background if possible |
||
31 | |||
32 | $mirror = strpos($this->rotation, '!') === false ? false : true; |
||
33 | $rotation = $mirror ? substr($this->rotation, 1) : $this->rotation; |
||
34 | if ($mirror) { |
||
35 | $image->flop(); |
||
36 | } |
||
37 | |||
38 | return $image->rotate(-$rotation); |
||
39 | } |
||
41 |