Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 43c452a

Browse files
committed
wip
1 parent 337a5ee commit 43c452a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Support/Timezone.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ class Timezone
2727
TimeZoneRegion::PACIFIC => DateTimeZone::PACIFIC,
2828
];
2929

30-
/**
30+
/*
3131
* Specify a subset of regions to return.
32-
*
33-
* @var bool|array
3432
*/
35-
protected $only;
33+
protected bool|array|string|null $only;
3634

3735
protected array $timezones;
3836

@@ -41,7 +39,7 @@ public function __construct()
4139
$this->only(config('form-components.timezone_subset', false));
4240
}
4341

44-
public function only($only): self
42+
public function only(array|string|bool|null $only): self
4543
{
4644
if (is_string($only)) {
4745
$only = [$only];
@@ -79,7 +77,7 @@ public function all(): array
7977
return $this->timezones = $timezones;
8078
}
8179

82-
protected function format(string $timezone, string $region): string
80+
protected function format(string $timezone): string
8381
{
8482
$time = new DateTime('', new DateTimeZone($timezone));
8583
$offset = $time->format('P');

0 commit comments

Comments
 (0)