1 | <?php |
||
15 | class RouteDispatcher extends AbstractMiddleware |
||
16 | { |
||
17 | /** |
||
18 | * @var string Middleware attribute name |
||
19 | */ |
||
20 | protected $attribute = 'request-handler'; |
||
21 | |||
22 | /** |
||
23 | * @var FastRouteDispatcher FastRoute dispatcher |
||
24 | */ |
||
25 | protected $dispatcherClass; |
||
26 | |||
27 | /** |
||
28 | * @param string $dispatcherClass |
||
29 | */ |
||
30 | public function __construct(string $dispatcherClass = GroupCountBasedDispatcher::class) |
||
34 | |||
35 | /** |
||
36 | * Set the FastRoute dispatcher class name. |
||
37 | * |
||
38 | * @param string $className |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function dispatcherClass(string $className) |
||
48 | |||
49 | /** |
||
50 | * Process a server request and return a response. |
||
51 | * |
||
52 | * @param ServerRequestInterface $request |
||
53 | * @param DelegateInterface $delegate |
||
54 | * |
||
55 | * @return ResponseInterface |
||
56 | */ |
||
57 | public function process(ServerRequestInterface $request, DelegateInterface $delegate) |
||
69 | |||
70 | /** |
||
71 | * @param ServerRequestInterface $request |
||
72 | * @param FastRouteDispatcher $dispatcher |
||
73 | * @return \Closure The request handler callable |
||
74 | * @throws HttpErrorException |
||
75 | */ |
||
76 | public function dispatch(ServerRequestInterface $request, FastRouteDispatcher $dispatcher = null) |
||
106 | } |
||
107 |
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..