1 | <?php |
||
9 | class KeyValuePair implements ValueObjectInterface |
||
10 | { |
||
11 | /** @var ValueObjectInterface */ |
||
12 | protected $key; |
||
13 | |||
14 | /** @var ValueObjectInterface */ |
||
15 | protected $value; |
||
16 | |||
17 | /** |
||
18 | * Returns a KeyValuePair from native PHP arguments evaluated as strings |
||
19 | * |
||
20 | * @param string $key |
||
|
|||
21 | * @param string $value |
||
22 | * @return self |
||
23 | * @throws \InvalidArgumentException |
||
24 | */ |
||
25 | 2 | public static function fromNative() |
|
40 | |||
41 | /** |
||
42 | * Returns a KeyValuePair |
||
43 | * |
||
44 | * @param ValueObjectInterface $key |
||
45 | * @param ValueObjectInterface $value |
||
46 | */ |
||
47 | 13 | public function __construct(ValueObjectInterface $key, ValueObjectInterface $value) |
|
52 | |||
53 | /** |
||
54 | * Tells whether two KeyValuePair are equal |
||
55 | * |
||
56 | * @param ValueObjectInterface $keyValuePair |
||
57 | * @return bool |
||
58 | */ |
||
59 | 4 | public function sameValueAs(ValueObjectInterface $keyValuePair) |
|
67 | |||
68 | /** |
||
69 | * Returns key |
||
70 | * |
||
71 | * @return ValueObjectInterface |
||
72 | */ |
||
73 | 8 | public function getKey() |
|
77 | |||
78 | /** |
||
79 | * Returns value |
||
80 | * |
||
81 | * @return ValueObjectInterface |
||
82 | */ |
||
83 | 8 | public function getValue() |
|
87 | |||
88 | /** |
||
89 | * Returns a string representation of the KeyValuePair in format "$key => $value" |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | 1 | public function __toString() |
|
99 | } |
||
100 |
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.