| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public static function handle(ManipulatorInterface $image, array $params = []): ManipulatorInterface |
||
| 31 | { |
||
| 32 | if (false === isset($params['angle'])) { |
||
| 33 | throw new Exception('Param "angle" is required for action "Rotate"'); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $image->rotate( |
||
| 37 | $params['angle'], |
||
| 38 | isset($params['background']) ? new Color($params['background']) : null |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |