| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function indexAction() |
||
| 12 | { |
||
| 13 | $container = ContainerService::getInstance()->getContainer(); |
||
| 14 | |||
| 15 | /** @var ClientRepository $clientRepository */ |
||
| 16 | $clientRepository = $container['repository.Client']; |
||
| 17 | |||
| 18 | /** @var Client $user */ |
||
| 19 | $clients = $clientRepository->findAll(); |
||
| 20 | |||
| 21 | if (count($clients) == 0) { |
||
| 22 | $this->sendJsonResponse(['No clients found']); |
||
| 23 | } |
||
| 24 | |||
| 25 | $this->sendJsonResponse($clients); |
||
| 26 | } |
||
| 27 | } |