1 | <?php |
||
15 | abstract class AbstractEnumType extends AbstractType |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * ObjectType constructor. |
||
20 | * @param $config |
||
21 | */ |
||
22 | 8 | public function __construct($config = []) |
|
31 | |||
32 | /** |
||
33 | * @return String predefined type kind |
||
34 | */ |
||
35 | 3 | public function getKind() |
|
39 | |||
40 | /** |
||
41 | * @param $value mixed |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function isValidValue($value) |
||
46 | { |
||
47 | return in_array($value, array_map(function ($item) { return $item['value']; }, $this->getConfig()->get('values'))); |
||
48 | } |
||
49 | |||
50 | abstract public function getValues(); |
||
51 | |||
52 | 4 | public function checkBuild() |
|
55 | |||
56 | 1 | public function serialize($value) |
|
60 | |||
61 | 1 | public function resolve($value) |
|
71 | } |
||
72 |
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..