| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function getMany() |
||
| 12 | { |
||
| 13 | $rules = app(RuleRepository::class)->getAll(); |
||
| 14 | |||
| 15 | $transformer = new RuleTransformer(); |
||
| 16 | $data = array_map(function (Rule $rule) use ($transformer) { |
||
| 17 | return $transformer->transform($rule); |
||
| 18 | }, $rules); |
||
| 19 | |||
| 20 | return (new Response($data))->toArray(); |
||
| 21 | } |
||
| 22 | } |