1 | <?php |
||
10 | class Collection implements ValueObjectInterface |
||
11 | { |
||
12 | /** @var \SplFixedArray */ |
||
13 | protected $items; |
||
14 | |||
15 | /** |
||
16 | * Returns a new Collection object |
||
17 | * |
||
18 | * @param \SplFixedArray $array |
||
|
|||
19 | * @return self |
||
20 | */ |
||
21 | 3 | public static function fromNative() |
|
38 | |||
39 | /** |
||
40 | * Returns a new Collection object |
||
41 | * |
||
42 | * @return self |
||
43 | */ |
||
44 | 12 | public function __construct(\SplFixedArray $items) |
|
55 | |||
56 | /** |
||
57 | * Tells whether two Collection are equal by comparing their size and items (item order matters) |
||
58 | * |
||
59 | * @param ValueObjectInterface $collection |
||
60 | * @return bool |
||
61 | */ |
||
62 | 6 | public function sameValueAs(ValueObjectInterface $collection) |
|
78 | |||
79 | /** |
||
80 | * Returns the number of objects in the collection |
||
81 | * |
||
82 | * @return Natural |
||
83 | */ |
||
84 | 10 | public function count() |
|
88 | |||
89 | /** |
||
90 | * Tells whether the Collection contains an object |
||
91 | * |
||
92 | * @param ValueObjectInterface $object |
||
93 | * @return bool |
||
94 | */ |
||
95 | 3 | public function contains(ValueObjectInterface $object) |
|
105 | |||
106 | /** |
||
107 | * Returns a native array representation of the Collection |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | 7 | public function toArray() |
|
115 | |||
116 | /** |
||
117 | * Returns a native string representation of the Collection object |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | 1 | public function __toString() |
|
127 | } |
||
128 |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.