| Total Complexity | 7 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class DateTimeFormatter implements Formatter |
||
| 14 | { |
||
| 15 | use HelpsFormatData; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | public string $datetime_format = 'Y-m-d H:i'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var mixed |
||
| 24 | */ |
||
| 25 | public mixed $instance; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var mixed |
||
| 29 | */ |
||
| 30 | public mixed $timezone; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Format the date and time. |
||
| 34 | * |
||
| 35 | * @param Collection $items |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 8 | public function format(Collection $items): string |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param Collection $items |
||
| 60 | * |
||
| 61 | * @return void |
||
| 62 | */ |
||
| 63 | 8 | protected function getInstance(Collection $items): void |
|
| 64 | { |
||
| 65 | 8 | $this->instance = $items->first(); |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @param Collection $items |
||
| 70 | * |
||
| 71 | * @return void |
||
| 72 | */ |
||
| 73 | 8 | protected function setTimezone(Collection $items): void |
|
| 79 | } |
||
| 80 | } |
||
| 82 |