| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function index(UserRepository $userRepository): ResponseInterface |
||
| 24 | { |
||
| 25 | $dataReader = $userRepository->findAll()->withSort(Sort::only(['login'])->withOrderString('login')); |
||
| 26 | $users = $dataReader->read(); |
||
| 27 | |||
| 28 | $items = []; |
||
| 29 | foreach ($users as $user) { |
||
| 30 | $items[] = ['login' => $user->getLogin(), 'created_at' => $user->getCreatedAt()->format('H:i:s d.m.Y')]; |
||
| 31 | } |
||
| 32 | |||
| 33 | return $this->responseFactory->createResponse($items); |
||
| 34 | } |
||
| 51 |