| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | public function __invoke( |
||
| 58 | CurrentRoute $currentRoute, |
||
| 59 | UserRepository $userRepository, |
||
| 60 | ResponseFactory $responseFactory, |
||
| 61 | ): ResponseInterface { |
||
| 62 | /** |
||
| 63 | * @var User $user |
||
| 64 | */ |
||
| 65 | $user = $userRepository->findByPK($currentRoute->getArgument('id')); |
||
| 66 | if ($user === null) { |
||
| 67 | throw new NotFoundException(); |
||
| 68 | } |
||
| 69 | |||
| 70 | return $responseFactory->create($user); |
||
| 71 | } |
||
| 73 |