Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class DateHelper extends FrameworkDateHelper |
||
12 | { |
||
13 | /** |
||
14 | * @param \DateTime|null $dateTime |
||
15 | * |
||
16 | * @return string |
||
17 | */ |
||
18 | public static function format(?\DateTime $dateTime): string |
||
19 | { |
||
20 | if (!$dateTime) { |
||
21 | return ''; |
||
22 | } |
||
23 | |||
24 | return $dateTime->format(Environment::getVar(Env::ADMIN_DATE_FORMAT)); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param \DateTime|null $dateTime |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | public static function formatDateTime(?\DateTime $dateTime): string |
||
39 | } |
||
40 | } |
||
41 |