Total Complexity | 8 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | final class Enum implements Property |
||
19 | { |
||
20 | private const PATTERN = '~^\??enum\((?<values>.+)\)$~'; |
||
21 | |||
22 | private $values; |
||
23 | private $optional = false; |
||
24 | |||
25 | 13 | private function __construct(Set $values) |
|
26 | { |
||
27 | 13 | $this->values = $values; |
|
28 | 13 | } |
|
29 | |||
30 | 16 | public static function build(Str $schema, Properties $properties): Property |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 7 | public function process($value) |
|
72 |