1 | <?php |
||
21 | final class Country |
||
22 | { |
||
23 | /** |
||
24 | * @var CountryCode |
||
25 | */ |
||
26 | private $countryCode; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $countryName; |
||
32 | |||
33 | /** |
||
34 | * @param CountryCode $countryCode |
||
35 | * @param string $countryName |
||
36 | */ |
||
37 | public function __construct(CountryCode $countryCode, $countryName) |
||
46 | |||
47 | /** |
||
48 | * @return CountryCode |
||
49 | */ |
||
50 | public function getCountryCode() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getCountryName() |
||
62 | |||
63 | /** |
||
64 | * @param self $other |
||
|
|||
65 | * @return bool |
||
66 | */ |
||
67 | public function equals(self $other) |
||
71 | |||
72 | public function __toString() |
||
76 | } |
||
77 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.