1 | <?php |
||
18 | class AliasGroup implements Countable { |
||
19 | |||
20 | /** |
||
21 | * @var string Language code identifying the language of the aliases, but note that there is |
||
22 | * nothing this class can do to enforce this convention. |
||
23 | */ |
||
24 | private $languageCode; |
||
25 | |||
26 | /** |
||
27 | * @var string[] |
||
28 | */ |
||
29 | private $aliases; |
||
30 | |||
31 | /** |
||
32 | * @param string $languageCode Language of the aliases. |
||
33 | * @param string[] $aliases |
||
34 | * |
||
35 | * @throws InvalidArgumentException |
||
36 | */ |
||
37 | public function __construct( $languageCode, array $aliases = [] ) { |
||
61 | 11 | ||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getLanguageCode() { |
||
68 | |||
69 | /** |
||
70 | * @return string[] |
||
71 | */ |
||
72 | public function getAliases() { |
||
75 | |||
76 | /** |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function isEmpty() { |
||
82 | |||
83 | /** |
||
84 | * |
||
85 | * @param mixed $target |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function equals( $target ) { |
||
99 | 5 | ||
100 | /** |
||
101 | * @see Countable::count |
||
102 | * |
||
103 | * @return int |
||
104 | */ |
||
105 | public function count() { |
||
108 | 1 | ||
109 | } |
||
110 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..