diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-22 20:25:47 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-09 10:56:24 +0100 |
commit | 53054b2bf6a919fd4ff9b44b6ad1986f21f488b6 (patch) | |
tree | 39cad52645ce00fbf863ff8e482d10dfcbe7f26c /application/TimeZone.php | |
parent | e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd (diff) | |
download | Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.gz Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.zst Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.zip |
Apply PHP Code Beautifier on source code for linter automatic fixes
Diffstat (limited to 'application/TimeZone.php')
-rw-r--r-- | application/TimeZone.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/application/TimeZone.php b/application/TimeZone.php index c1869ef8..a420eb96 100644 --- a/application/TimeZone.php +++ b/application/TimeZone.php | |||
@@ -1,4 +1,5 @@ | |||
1 | <?php | 1 | <?php |
2 | |||
2 | /** | 3 | /** |
3 | * Generates a list of available timezone continents and cities. | 4 | * Generates a list of available timezone continents and cities. |
4 | * | 5 | * |
@@ -43,7 +44,7 @@ function generateTimeZoneData($installedTimeZones, $preselectedTimezone = '') | |||
43 | // Try to split the provided timezone | 44 | // Try to split the provided timezone |
44 | $spos = strpos($preselectedTimezone, '/'); | 45 | $spos = strpos($preselectedTimezone, '/'); |
45 | $pcontinent = substr($preselectedTimezone, 0, $spos); | 46 | $pcontinent = substr($preselectedTimezone, 0, $spos); |
46 | $pcity = substr($preselectedTimezone, $spos+1); | 47 | $pcity = substr($preselectedTimezone, $spos + 1); |
47 | } | 48 | } |
48 | 49 | ||
49 | $continents = []; | 50 | $continents = []; |
@@ -60,7 +61,7 @@ function generateTimeZoneData($installedTimeZones, $preselectedTimezone = '') | |||
60 | } | 61 | } |
61 | 62 | ||
62 | $continent = substr($tz, 0, $spos); | 63 | $continent = substr($tz, 0, $spos); |
63 | $city = substr($tz, $spos+1); | 64 | $city = substr($tz, $spos + 1); |
64 | $cities[] = ['continent' => $continent, 'city' => $city]; | 65 | $cities[] = ['continent' => $continent, 'city' => $city]; |
65 | $continents[$continent] = true; | 66 | $continents[$continent] = true; |
66 | } | 67 | } |
@@ -85,7 +86,7 @@ function generateTimeZoneData($installedTimeZones, $preselectedTimezone = '') | |||
85 | function isTimeZoneValid($continent, $city) | 86 | function isTimeZoneValid($continent, $city) |
86 | { | 87 | { |
87 | return in_array( | 88 | return in_array( |
88 | $continent.'/'.$city, | 89 | $continent . '/' . $city, |
89 | timezone_identifiers_list() | 90 | timezone_identifiers_list() |
90 | ); | 91 | ); |
91 | } | 92 | } |