| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null |
||
| 37 | { |
||
| 38 | // is_a($resourceClass, AbstractUser::class, true) |
||
| 39 | $request = $this->requestStack->getCurrentRequest(); |
||
| 40 | if (!$request || !($id = $request->attributes->get('id'))) { |
||
| 41 | return null; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $this->userRepository->loadUserByIdentifier($id); |
||
| 45 | } |
||
| 47 |