1 | <?php |
||
14 | final class ImageUploadAction |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * IndexAction constructor. |
||
19 | * |
||
20 | * @param Template $template template engine |
||
|
|||
21 | */ |
||
22 | public function __construct(Upload $upload) |
||
26 | |||
27 | /** |
||
28 | * Executed when action is called. |
||
29 | * |
||
30 | * @param RequestInterface $request request |
||
31 | * @param Response $response response |
||
32 | * @param callable|null $next next middleware |
||
33 | * |
||
34 | * @return JsonResponse |
||
35 | */ |
||
36 | public function __invoke(RequestInterface $request, Response $response, callable $next = null) |
||
44 | } |
||
45 |
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.