Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
11 | class UserController extends Controller |
||
12 | { |
||
13 | protected function getId(): string |
||
14 | { |
||
15 | return 'user'; |
||
16 | } |
||
17 | |||
18 | public function index(ORMInterface $orm): Response |
||
19 | { |
||
20 | $repository = $orm->getRepository(User::class); |
||
21 | $response = $this->responseFactory->createResponse(); |
||
22 | |||
23 | $data = [ |
||
24 | 'items' => $repository->findAll(), |
||
25 | ]; |
||
26 | |||
27 | $output = $this->render('index', $data); |
||
28 | |||
29 | $response->getBody()->write($output); |
||
30 | return $response; |
||
31 | } |
||
32 | |||
33 | public function profile(Request $request, ORMInterface $orm): Response |
||
52 | } |
||
53 | } |
||
54 |