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