| 1 | <?php |
||
| 5 | final class Roll |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | private $mark; |
||
| 9 | |||
| 10 | /** @var int|null */ |
||
| 11 | private $score; |
||
| 12 | |||
| 13 | /** @var RollType */ |
||
| 14 | private $type; |
||
| 15 | |||
| 16 | 34 | public function __construct(string $a_mark, int $a_score = null) |
|
| 22 | |||
| 23 | 34 | public static function fromMark($a_mark) |
|
| 41 | |||
| 42 | 22 | public function increaseScore($a_score) |
|
| 46 | |||
| 47 | 34 | public function type() : RollType |
|
| 51 | |||
| 52 | 34 | public function score() : int |
|
| 56 | } |
||
| 57 |
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..