Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class AuthenticationMiddleware implements MiddlewareInterface |
||
17 | { |
||
18 | 3 | public function __construct(private readonly UserRepository $userRepository) |
|
19 | { |
||
20 | 3 | } |
|
21 | |||
22 | /** |
||
23 | * Load current user from session if exists and still valid. |
||
24 | */ |
||
25 | 3 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
45 | } |
||
46 | } |
||
47 |