Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class DateValue extends AbstractValueType |
||
17 | { |
||
18 | /** |
||
19 | * Sanitize the value. |
||
20 | * |
||
21 | * @param string $value The unsanitized value |
||
22 | * @return string |
||
23 | */ |
||
24 | protected function sanitizeValue(string $value): string |
||
25 | { |
||
26 | return trim(preg_replace('/\s+/', ' ', $value)); |
||
27 | } |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Validate the value. |
||
32 | * |
||
33 | * @param string $value |
||
34 | * @throws \SimpleSAML\XML\Exception\SchemaViolationException on failure |
||
35 | * @return void |
||
36 | */ |
||
37 | protected function validateValue(string $value): void |
||
40 | } |
||
41 | } |
||
42 |