| 1 | <?php |
||
| 5 | class Task |
||
| 6 | { |
||
| 7 | /** @var callable */ |
||
| 8 | private $callable; |
||
| 9 | |||
| 10 | /** @var array */ |
||
| 11 | private $args; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | private $tag; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param callable $callable |
||
| 18 | * @param array $args |
||
| 19 | * @param string $string |
||
|
|
|||
| 20 | */ |
||
| 21 | public function __construct($callable, $args, $tag) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function serialize() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return \Ackintosh\Snidel\Task |
||
| 39 | */ |
||
| 40 | public function unserialize() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return callable |
||
| 48 | */ |
||
| 49 | public function getCallable() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | public function getArgs() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string|null |
||
| 64 | */ |
||
| 65 | public function getTag() |
||
| 69 | |||
| 70 | private function isClosure() |
||
| 74 | } |
||
| 75 |
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.