| 1 | <?php |
||
| 14 | trait MetaTrait |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The meta data. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $meta = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get the meta data. |
||
| 25 | * |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | public function getMeta() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Set the meta data. |
||
| 35 | * |
||
| 36 | * @param array $meta |
||
| 37 | */ |
||
| 38 | public function replaceMeta(array $meta) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set a piece of meta data. |
||
| 45 | * |
||
| 46 | * @param string $key |
||
| 47 | * @param mixed $value |
||
| 48 | */ |
||
| 49 | public function setMeta($key, $value) |
||
| 53 | |||
| 54 | /** |
||
| 55 | 6 | * Remove a piece of meta data. |
|
| 56 | * |
||
| 57 | 6 | * @param string $key |
|
| 58 | * @param mixed $value |
||
|
|
|||
| 59 | 6 | */ |
|
| 60 | public function removeMeta($key) |
||
| 64 | } |
||
| 65 |
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.