Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 1 | public function create(DataReaderInterface $dataReader): ResponseInterface |
|
19 | { |
||
20 | 1 | $response = []; |
|
21 | 1 | foreach ($dataReader->read() as $user) { |
|
22 | 1 | $response[] = new Response( |
|
23 | 1 | $user->getLogin(), |
|
24 | 1 | $user->getCreatedAt()->format(\DateTimeImmutable::ATOM) |
|
25 | ); |
||
26 | } |
||
27 | |||
28 | 1 | return $this->responseFactory->createResponse([ |
|
29 | 1 | 'users' => $response, |
|
30 | ]); |
||
33 |