1 | <?php |
||
27 | class OrderedMap extends AbstractMap |
||
28 | { |
||
29 | private $map; |
||
30 | |||
31 | private $list; |
||
32 | |||
33 | 29 | public function __construct(Map $map, ArrayList $list) |
|
38 | |||
39 | /** |
||
40 | * Adds an element to the Map |
||
41 | * |
||
42 | * @param KeyType $key The key to add |
||
|
|||
43 | * @param ValueType $value The value to add |
||
44 | */ |
||
45 | 6 | public function insert(Pair $pair) |
|
60 | |||
61 | /** |
||
62 | * Checks if a key exists |
||
63 | * |
||
64 | * @param KeyType $key The key to search for |
||
65 | * @return boolean |
||
66 | */ |
||
67 | 1 | public function containsKey($key) : bool |
|
71 | |||
72 | /** |
||
73 | * Removes an item from the map |
||
74 | * |
||
75 | * @param KeyType $key The key of the keypair to remove |
||
76 | */ |
||
77 | 1 | public function remove($key) |
|
84 | |||
85 | /** |
||
86 | * Gets an item from the map, looking it up by the specified key |
||
87 | * |
||
88 | * @param KeyType $key |
||
89 | * @return OrderedPair |
||
90 | */ |
||
91 | 2 | public function getPair($key) : Pair |
|
97 | |||
98 | 3 | public function getIterator() |
|
102 | |||
103 | 7 | public function size() : int |
|
107 | |||
108 | public function indexOfKey($key) |
||
112 | } |
||
113 |
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.