1 | <?php |
||
13 | class EnumRule implements Rule |
||
14 | { |
||
15 | protected $rule = 'enum'; |
||
16 | |||
17 | /** @var Enumerable */ |
||
18 | protected $enum; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $attribute; |
||
22 | |||
23 | /** @var mixed */ |
||
24 | protected $value; |
||
25 | |||
26 | public function __construct(string $enum) |
||
34 | |||
35 | public function passes($attribute, $value): bool |
||
48 | |||
49 | public function message(): string |
||
58 | |||
59 | protected function getDisplayableOtherValues(): array |
||
65 | |||
66 | /** |
||
67 | * @param string|int $value |
||
68 | * |
||
69 | * @return string|null |
||
70 | */ |
||
71 | protected function getValueTranslation($value): ?string |
||
75 | |||
76 | protected function getOtherValues(): array |
||
80 | } |
||
81 |
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..