Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function __invoke(array $arguments = []): Response |
||
21 | { |
||
22 | // At this point you would normally fetch some data from a domain or service: |
||
23 | $customers = [ |
||
24 | [ |
||
25 | 'id' => 1, |
||
26 | 'firstname' => 'Mikka', |
||
27 | 'lastname' => 'Makka', |
||
28 | ], |
||
29 | [ |
||
30 | 'id' => 2, |
||
31 | 'firstname' => 'Zorro', |
||
32 | 'lastname' => 'Morro', |
||
33 | ] |
||
34 | ]; |
||
35 | |||
36 | // The data than automatically converted to JSON and send back to the client: |
||
37 | return $this->responder->found($customers); |
||
38 | } |
||
40 |