| 1 | <?php |
||
| 7 | class Task implements TaskInterface |
||
| 8 | { |
||
| 9 | /** @var callable */ |
||
| 10 | private $callable; |
||
| 11 | |||
| 12 | /** @var array */ |
||
| 13 | private $args; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | private $tag; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param callable $callable |
||
| 20 | * @param array $args |
||
| 21 | * @param string $string |
||
|
|
|||
| 22 | */ |
||
| 23 | public function __construct($callable, $args, $tag) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return callable |
||
| 32 | */ |
||
| 33 | public function getCallable() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function getArgs() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return string|null |
||
| 48 | */ |
||
| 49 | public function getTag() |
||
| 53 | } |
||
| 54 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.