Total Complexity | 5 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class BaseHelper |
||
11 | { |
||
12 | /** |
||
13 | * @param string $date |
||
14 | * @param string $format |
||
15 | * |
||
16 | * @return string |
||
17 | */ |
||
18 | public static function getDateAt(string $date, string $format = 'd.m.Y H:i:s'): string |
||
19 | { |
||
20 | $inDateTime = new \DateTime($date); |
||
21 | |||
22 | return date($format, $inDateTime->getTimestamp()); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return string |
||
27 | */ |
||
28 | public static function ip_address() |
||
42 | } |
||
43 | } |
||
44 |