1 | <?php declare(strict_types=1); |
||
8 | abstract class EnumType extends Definition\EnumType |
||
9 | { |
||
10 | /** |
||
11 | * {@inheritdoc} |
||
12 | * |
||
13 | * @param array<string, mixed> $config |
||
14 | */ |
||
15 | public function __construct(array $config = []) |
||
22 | |||
23 | /** |
||
24 | * Override to customize how enum values are created. |
||
25 | * |
||
26 | * @return array<string, array<string>> |
||
|
|||
27 | */ |
||
28 | protected function createValues(): array |
||
38 | |||
39 | /** |
||
40 | * @param int|string $value One of the EnumInterface implementation enumerated value |
||
41 | * |
||
42 | * @return string|int |
||
43 | */ |
||
44 | protected function getEnumValueName($value) |
||
48 | |||
49 | /** |
||
50 | * @return string The enum FQCN for which we should create a type. |
||
51 | */ |
||
52 | abstract protected static function getEnumClass(): string; |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | * |
||
57 | * @param EnumInterface|null $value |
||
58 | */ |
||
59 | public function serialize($value) |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function parseValue($value) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | * |
||
79 | * @param array<string, mixed>|null $variables |
||
80 | */ |
||
81 | public function parseLiteral($valueNode, ?array $variables = null) |
||
89 | } |
||
90 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.