1 | <?php |
||
8 | class Country implements ValueObjectInterface |
||
9 | { |
||
10 | /** @var CountryCode */ |
||
11 | protected $code; |
||
12 | |||
13 | /** |
||
14 | * Returns a new Country object given a native PHP string country code |
||
15 | * |
||
16 | * @param string $code |
||
|
|||
17 | * @return self |
||
18 | */ |
||
19 | 2 | public static function fromNative() |
|
27 | |||
28 | /** |
||
29 | * Returns a new Country object |
||
30 | * |
||
31 | * @param CountryCode $code |
||
32 | */ |
||
33 | 16 | public function __construct(CountryCode $code) |
|
37 | |||
38 | /** |
||
39 | * Tells whether two Country are equal |
||
40 | * |
||
41 | * @param ValueObjectInterface $country |
||
42 | * @return bool |
||
43 | */ |
||
44 | 5 | public function sameValueAs(ValueObjectInterface $country) |
|
52 | |||
53 | /** |
||
54 | * Returns country code |
||
55 | * |
||
56 | * @return CountryCode |
||
57 | */ |
||
58 | 9 | public function getCode() |
|
62 | |||
63 | /** |
||
64 | * Returns country name |
||
65 | * |
||
66 | * @return StringLiteral |
||
67 | */ |
||
68 | 3 | public function getName() |
|
75 | |||
76 | /** |
||
77 | * Returns country name as native string |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | 2 | public function __toString() |
|
85 | } |
||
86 |
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.