1 | <?php |
||
7 | class SpecialDiceFactory implements DiceFactory |
||
8 | { |
||
9 | /** |
||
10 | * @var callable[] |
||
11 | */ |
||
12 | private $diceTypeMappings; |
||
13 | |||
14 | public function __construct() |
||
25 | |||
26 | |||
27 | public function handlesType(string $type) : bool |
||
34 | |||
35 | /** |
||
36 | * @param string $type |
||
37 | * @param int $number |
||
38 | * @return Dice[] |
||
39 | */ |
||
40 | public function buildDice(string $type, int $number) : array |
||
45 | |||
46 | private function normaliseType(string $type): string |
||
50 | |||
51 | private function buildNDice($diceCount, callable $constructorFunction) |
||
59 | } |
||
60 |
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..