| 1 | <?php |
||
| 24 | abstract class AbstractCollection implements Collection |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Holds the entries of the collection |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | private $elements; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Collection constructor |
||
| 35 | * |
||
| 36 | * @param array $data |
||
|
|
|||
| 37 | */ |
||
| 38 | public function __construct(array $elements = array()) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | */ |
||
| 50 | public function add($key, $value) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @inheritDoc |
||
| 63 | */ |
||
| 64 | public function exists($key) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @inheritDoc |
||
| 71 | */ |
||
| 72 | public function get($key) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @inheritDoc |
||
| 83 | */ |
||
| 84 | public function count() |
||
| 88 | } |
||
| 89 |
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.