Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class DateTimeValue extends AbstractValueType |
||
15 | { |
||
16 | /** @var string */ |
||
17 | public const SCHEMA_TYPE = 'xs:dateTime'; |
||
18 | |||
19 | /** @var string */ |
||
20 | public const DATETIME_FORMAT = 'Y-m-d\\TH:i:sP'; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * Sanitize the value. |
||
25 | * |
||
26 | * @param string $value The unsanitized value |
||
27 | * @return string |
||
28 | */ |
||
29 | protected function sanitizeValue(string $value): string |
||
32 | } |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Validate the value. |
||
37 | * |
||
38 | * @param string $value |
||
39 | * @throws \SimpleSAML\XML\Exception\SchemaViolationException on failure |
||
40 | * @return void |
||
41 | */ |
||
42 | protected function validateValue(string $value): void |
||
45 | } |
||
46 | |||
47 | |||
48 | /** |
||
49 | * @param \DateTimeInterface $value |
||
50 | * @return static |
||
51 | */ |
||
52 | public static function fromDateTime(DateTimeInterface $value): static |
||
57 |