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