| 1 | <?php |
||
| 14 | final class AuthenticationMiddleware |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var AuthenticationErrorHandlerInterface |
||
| 18 | */ |
||
| 19 | private $middleware; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param AuthenticationInterface $authentication |
||
| 23 | */ |
||
| 24 | 3 | public function __construct(AuthenticationInterface $authentication) |
|
| 25 | { |
||
| 26 | 3 | $this->middleware = new AuthenticationErrorResponseMiddleware( |
|
|
|
|||
| 27 | 3 | $authentication, |
|
| 28 | new class() implements AuthenticationErrorHandlerInterface { |
||
| 29 | 1 | public function errorResponse(Request $request, Response $response, int $code): Response |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param Request $request |
||
| 39 | * @param Response $response |
||
| 40 | * @param callable|null $next |
||
| 41 | * |
||
| 42 | * @return Response |
||
| 43 | * |
||
| 44 | * @throws HttpException |
||
| 45 | */ |
||
| 46 | 3 | public function __invoke(Request $request, Response $response, callable $next = null) |
|
| 50 | } |
||
| 51 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..