| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 2 | public static function getTimezone(string $city, string $default = null): ?string |
|
| 34 | { |
||
| 35 | 2 | $timezone = static::collection()->first(function (array $timezone) use ($city) { |
|
| 36 | 2 | return Str::contains($timezone['city'], Str::lower($city)); |
|
| 37 | 2 | }, []); |
|
| 38 | |||
| 39 | 2 | return $timezone['timezone'] ?? $default; |
|
| 40 | } |
||
| 42 |