| 1 | <?php |
||
| 14 | trait MetaTrait |
||
| 15 | { |
||
| 16 | private $meta = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Set the meta data. |
||
| 20 | * |
||
| 21 | * @param array $meta |
||
| 22 | */ |
||
| 23 | 9 | public function setMeta(array $meta) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Set a piece of meta data. |
||
| 30 | * |
||
| 31 | * @param string $key |
||
| 32 | * @param mixed $value |
||
| 33 | */ |
||
| 34 | 3 | public function setMetaItem($key, $value) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Remove a piece of meta data. |
||
| 41 | * |
||
| 42 | * @param string $key |
||
| 43 | * @param mixed $value |
||
|
|
|||
| 44 | */ |
||
| 45 | public function removeMetaItem($key) |
||
| 49 | } |
||
| 50 |
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.