Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | protected function validateValue(string $value): void |
||
33 | { |
||
34 | $sanitized = $this->sanitizeValue($value); |
||
35 | |||
36 | if ($sanitized !== '#all' && $sanitized !== '') { |
||
37 | $list = explode(' ', $sanitized, C::UNBOUNDED_LIMIT); |
||
38 | |||
39 | // After filtering the allowed values, there should be nothing left |
||
40 | $filtered = array_diff( |
||
41 | $list, |
||
42 | [ |
||
43 | DerivationControlEnum::Extension->value, |
||
44 | DerivationControlEnum::Restriction->value, |
||
45 | DerivationControlEnum::Substitution->value, |
||
46 | ], |
||
47 | ); |
||
48 | Assert::isEmpty($filtered, SchemaViolationException::class); |
||
49 | } |
||
52 |