Total Complexity | 9 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 0 |
1 | <?php |
||
18 | 1 | class DateTimeConverter implements IConverter |
|
19 | { |
||
20 | |||
21 | /** |
||
22 | * @param string $format of date time |
||
23 | */ |
||
24 | 1 | public function __construct( |
|
25 | private readonly string $format = 'c', |
||
26 | ) |
||
27 | { |
||
28 | 1 | } |
|
29 | |||
30 | /** |
||
31 | * Converts DateTime objects in resource to string |
||
32 | * @param array<TK, TVal> $resource |
||
33 | * @return array<int|string, mixed> |
||
34 | */ |
||
35 | public function convert(array $resource): array |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param array<TK, TVal>|Traversable<TK, TVal>|string|int|object $array |
||
42 | * @return array<string, mixed>|string |
||
43 | */ |
||
44 | private function parseDateTimeToString(mixed $array): array|string |
||
60 | } |
||
61 | } |
||
62 |