1 | <?php declare(strict_types=1); |
||
14 | class Dispatcher extends GroupCountBasedDispatcher implements |
||
15 | MiddlewareAwareInterface, |
||
16 | RequestHandlerInterface, |
||
17 | StrategyAwareInterface |
||
18 | { |
||
19 | use MiddlewareAwareTrait; |
||
20 | use StrategyAwareTrait; |
||
21 | |||
22 | /** |
||
23 | * Dispatch the current route. |
||
24 | * |
||
25 | * @param \Psr\Http\Message\ServerRequestInterface $request |
||
26 | * |
||
27 | * @return \Psr\Http\Message\ResponseInterface |
||
28 | */ |
||
29 | 24 | public function dispatchRequest(ServerRequestInterface $request) : ResponseInterface |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 24 | public function handle(ServerRequestInterface $request) : ResponseInterface |
|
63 | |||
64 | /** |
||
65 | * Handle dispatching of a found route. |
||
66 | * |
||
67 | * @param \League\Route\Route $route |
||
68 | * @param array $vars |
||
|
|||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | 12 | protected function setFoundMiddleware(Route $route) : void |
|
91 | |||
92 | /** |
||
93 | * Handle a not found route. |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | 6 | protected function setNotFoundDecoratorMiddleware() : void |
|
102 | |||
103 | /** |
||
104 | * Handles a not allowed route. |
||
105 | * |
||
106 | * @param array $allowed |
||
107 | * |
||
108 | * @return void |
||
109 | */ |
||
110 | 6 | protected function setMethodNotAllowedDecoratorMiddleware(array $allowed) : void |
|
118 | } |
||
119 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.