| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 2 | public function __invoke(string $extension, Request $request) |
|
| 33 | { |
||
| 34 | 2 | if (! in_array($extension, config('lorem-image.drivers.color-block.extensions', []))) { |
|
| 35 | abort(404); |
||
| 36 | } |
||
| 37 | |||
| 38 | 2 | return (new ColorBlockMaker( |
|
| 39 | $extension, |
||
| 40 | 2 | $request->get(static::$withParameterName, 100) ?? 100, |
|
| 41 | 2 | $request->get(static::$heightParameterName, 100) ?? 100, |
|
| 42 | 2 | $request->get(static::$colorParameterName, '#808080') ?: '#808080', |
|
| 43 | 2 | ))->image(); |
|
| 44 | } |
||
| 46 |