| Conditions | 5 |
| Paths | 16 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function load(ImageInterface $image, array $options = []) |
||
| 25 | { |
||
| 26 | $x = isset($options['start'][0]) ? $options['start'][0] : null; |
||
| 27 | $y = isset($options['start'][1]) ? $options['start'][1] : null; |
||
| 28 | |||
| 29 | $width = isset($options['size'][0]) ? $options['size'][0] : null; |
||
| 30 | $height = isset($options['size'][1]) ? $options['size'][1] : null; |
||
| 31 | |||
| 32 | $filter = new Crop(new Point($x, $y), new Box($width, $height)); |
||
| 33 | $image = $filter->apply($image); |
||
| 34 | |||
| 35 | return $image; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |