| 1 | <?php |
||
| 10 | class Members |
||
| 11 | { |
||
| 12 | use ImmutableTrait, SerializableTrait; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $rankTitle; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Character[] |
||
| 21 | */ |
||
| 22 | private $characters; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Members constructor. |
||
| 26 | * @param string $rankTitle |
||
| 27 | * @param array $characters |
||
| 28 | * @throws ImmutableException |
||
| 29 | */ |
||
| 30 | public function __construct(string $rankTitle, Collection $characters) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function getRankTitle(): string |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return Character[] |
||
| 48 | */ |
||
| 49 | public function getCharacters(): Collection |
||
| 53 | } |
||
| 54 |
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..