| Total Complexity | 1 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class EncodingStyleValue extends NMTokensValue |
||
| 18 | { |
||
| 19 | public const string SCHEMA_TYPE = 'encodingStyle'; |
||
|
|
|||
| 20 | |||
| 21 | |||
| 22 | /** |
||
| 23 | * Validate the value. |
||
| 24 | * |
||
| 25 | * @param string $value The value |
||
| 26 | * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure |
||
| 27 | */ |
||
| 28 | protected function validateValue(string $value): void |
||
| 29 | { |
||
| 30 | $sanitized = $this->sanitizeValue($value); |
||
| 31 | Assert::stringNotEmpty($sanitized, SchemaViolationException::class); |
||
| 32 | |||
| 33 | $list = explode(' ', $sanitized, C::UNBOUNDED_LIMIT); |
||
| 34 | Assert::allValidAnyURI($list, SchemaViolationException::class); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |