Total Complexity | 11 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class SchemaDateAttribute extends SchemaAttribute |
||
13 | { |
||
14 | protected string $format; |
||
15 | |||
16 | public function __construct(Schema $schema, string $name, string $format = DateTimeInterface::RFC3339) |
||
17 | { |
||
18 | parent::__construct($schema, $name); |
||
19 | $this->format = $format; |
||
20 | } |
||
21 | |||
22 | // |
||
23 | |||
24 | public function getFormat(): string |
||
25 | { |
||
26 | return $this->format; |
||
27 | } |
||
28 | |||
29 | public function format(string $format): self |
||
30 | { |
||
31 | $this->format = $format; |
||
32 | return $this; |
||
33 | } |
||
34 | |||
35 | // |
||
36 | |||
37 | public function parseContextual($value) |
||
48 | } |
||
49 | |||
50 | public function serialize($value) |
||
61 | } |
||
62 | |||
63 | public static function from(Schema $schema, string $name): self |
||
66 | } |
||
67 | } |