Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function listAction() |
||
21 | { |
||
22 | $users = $this->getDoctrine() |
||
23 | ->getRepository('AppBundle:User') |
||
24 | ->findAll(); |
||
25 | if (!$users) { |
||
26 | throw new JsonHttpException(404, 'User not found.'); |
||
27 | } |
||
28 | return $this->json(['users' => $users], 200, [], [AbstractNormalizer::GROUPS => ['Short']]); |
||
29 | } |
||
30 | } |
||
31 |