@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | string $line_endings, |
108 | 108 | string $filename, |
109 | 109 | string $format, |
110 | - Collection|null $records = null |
|
110 | + Collection | null $records = null |
|
111 | 111 | ): ResponseInterface { |
112 | 112 | $access_level = self::ACCESS_LEVELS[$privacy]; |
113 | 113 | |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | string $encoding = UTF8::NAME, |
178 | 178 | int $access_level = Auth::PRIV_HIDE, |
179 | 179 | string $line_endings = 'CRLF', |
180 | - Collection|null $records = null, |
|
181 | - ZipArchive|FilesystemOperator|null $zip_filesystem = null, |
|
182 | - string|null $media_path = null |
|
180 | + Collection | null $records = null, |
|
181 | + ZipArchive | FilesystemOperator | null $zip_filesystem = null, |
|
182 | + string | null $media_path = null |
|
183 | 183 | ) { |
184 | 184 | $stream = fopen('php://memory', 'wb+'); |
185 | 185 |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | /** |
165 | 165 | * @param list<int> $parent_place_ids |
166 | 166 | */ |
167 | - public function deleteUnusedLocations(int|null $parent_location_id, array $parent_place_ids): void |
|
167 | + public function deleteUnusedLocations(int | null $parent_location_id, array $parent_place_ids): void |
|
168 | 168 | { |
169 | 169 | if ($parent_location_id === null) { |
170 | 170 | $location_query = DB::table('place_location') |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * |
200 | 200 | * @return Collection<int,object{id:int,key:string,place:string,latitude:float|null,longitude:float|null,child_count:int,no_coord:int}> |
201 | 201 | */ |
202 | - public function getPlaceListLocation(int|null $parent_id): Collection |
|
202 | + public function getPlaceListLocation(int | null $parent_id): Collection |
|
203 | 203 | { |
204 | 204 | $expression = |
205 | 205 | DB::prefix('p1') . '.place IS NOT NULL AND ' . DB::prefix('p1') . '.latitude IS NULL OR ' . |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | 'child_count' => (int) $row->child_count, |
249 | 249 | 'no_coord' => (int) $row->no_coord, |
250 | 250 | ]) |
251 | - ->sort(static fn (object $x, object $y): int => I18N::comparator()($x->place, $y->place)); |
|
251 | + ->sort(static fn (object $x, object $y) : int => I18N::comparator()($x->place, $y->place)); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | public function writeLatitude(float $latitude): string |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | - $validated_bot = false; |
|
256 | + $validated_bot = false; |
|
257 | 257 | |
258 | 258 | foreach (self::ROBOT_REV_FWD_DNS as $robot => $valid_domains) { |
259 | 259 | if (str_contains($ua, $robot)) { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | return Registry::cache()->file()->remember('whois-asn-' . $asn, function () use ($asn): array { |
381 | 381 | $ranges = $this->network_service->findIpRangesForAsn($asn); |
382 | - $mapper = static fn (string $range): RangeInterface|null => Factory::parseRangeString($range); |
|
382 | + $mapper = static fn (string $range): RangeInterface | null => Factory::parseRangeString($range); |
|
383 | 383 | $ranges = array_map($mapper, $ranges); |
384 | 384 | |
385 | 385 | return array_filter($ranges); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $rows = $query |
102 | 102 | ->groupBy(['n_givn']) |
103 | 103 | ->pluck(new Expression('COUNT(DISTINCT n_id) AS total'), 'n_givn') |
104 | - ->map(static fn (int|string $count): int => (int) $count); |
|
104 | + ->map(static fn (int | string $count): int => (int) $count); |
|
105 | 105 | |
106 | 106 | |
107 | 107 | $given_names = []; |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | * |
785 | 785 | * @return object{id:string,year:int,fact:string,type:string}|null |
786 | 786 | */ |
787 | - private function firstEvent(array $events, bool $ascending): object|null |
|
787 | + private function firstEvent(array $events, bool $ascending): object | null |
|
788 | 788 | { |
789 | 789 | if ($events === []) { |
790 | 790 | $events = [ |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | ->orderBy('d_julianday1', $ascending ? 'ASC' : 'DESC') |
804 | 804 | ->limit(1) |
805 | 805 | ->get() |
806 | - ->map(static fn (object $row): object => (object) [ |
|
806 | + ->map(static fn (object $row) : object => (object) [ |
|
807 | 807 | 'id' => $row->id, |
808 | 808 | 'year' => (int) $row->year, |
809 | 809 | 'fact' => $row->fact, |
@@ -916,14 +916,14 @@ discard block |
||
916 | 916 | return $date->display(); |
917 | 917 | } |
918 | 918 | |
919 | - public function isUserLoggedIn(int|null $user_id): bool |
|
919 | + public function isUserLoggedIn(int | null $user_id): bool |
|
920 | 920 | { |
921 | 921 | return $user_id !== null && DB::table('session') |
922 | 922 | ->where('user_id', '=', $user_id) |
923 | 923 | ->exists(); |
924 | 924 | } |
925 | 925 | |
926 | - public function latestUserId(): int|null |
|
926 | + public function latestUserId(): int | null |
|
927 | 927 | { |
928 | 928 | $user_id = DB::table('user') |
929 | 929 | ->select(['user.user_id']) |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | /** |
1136 | 1136 | * @return object{individual:Individual,days:int}|null |
1137 | 1137 | */ |
1138 | - public function longlifeQuery(string $sex): object|null |
|
1138 | + public function longlifeQuery(string $sex): object | null |
|
1139 | 1139 | { |
1140 | 1140 | return $this->birthAndDeathQuery($sex) |
1141 | 1141 | ->orderBy('days', 'desc') |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | 'label' => 'Day', |
136 | 136 | 'maxZoom' => 18, |
137 | 137 | 'minZoom' => 2, |
138 | - 'lang2' => $lang2, |
|
138 | + 'lang2' => $lang2, |
|
139 | 139 | 'url' => "https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/jpeg?size=256&style={variant}&lang=en&lang2={lang2}&apiKey={apiKey}", |
140 | 140 | 'variant' => 'explore.day', |
141 | 141 | 'localName' => 'HEREDay', |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | 'label' => 'Satellite Day', |
147 | 147 | 'maxZoom' => 18, |
148 | 148 | 'minZoom' => 2, |
149 | - 'lang2' => $lang2, |
|
149 | + 'lang2' => $lang2, |
|
150 | 150 | 'url' => "https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/jpeg?size=256&style={variant}&lang=en&lang2={lang2}&apiKey={apiKey}", |
151 | 151 | 'variant' => 'explore.satellite.day', |
152 | 152 | 'localName' => 'HEREDSatelliteDay', |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | 'label' => 'Night', |
158 | 158 | 'maxZoom' => 18, |
159 | 159 | 'minZoom' => 2, |
160 | - 'lang2' => $lang2, |
|
160 | + 'lang2' => $lang2, |
|
161 | 161 | 'url' => "https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/jpeg?size=256&style={variant}&lang=en&lang2={lang2}&apiKey={apiKey}", |
162 | 162 | 'variant' => 'explore.night', |
163 | 163 | 'localName' => 'HERENight', |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'label' => 'Terrain', |
169 | 169 | 'maxZoom' => 18, |
170 | 170 | 'minZoom' => 2, |
171 | - 'lang2' => $lang2, |
|
171 | + 'lang2' => $lang2, |
|
172 | 172 | 'url' => "https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/jpeg?size=256&style={variant}&lang=en&lang2={lang2}&apiKey={apiKey}", |
173 | 173 | 'variant' => 'topo.day', |
174 | 174 | 'localName' => 'HERETerrain', |
@@ -39,7 +39,7 @@ |
||
39 | 39 | use ModuleMapProviderTrait; |
40 | 40 | |
41 | 41 | // ISO-639-1 language schema |
42 | - private const array LANGUAGE_CODES = ["ar","as","az","be","bg","bn","bs","ca","cs","cy","da","de","el","en","es","et","eu","fi","fo","fr","ga","gl","gn","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lt","lv","mk","ml","mr","ms","mt","my","nl","no","or","pa","pl","pt","ro","ru","sk","sl","sq","sr","sv","ta","te","th","tr","uk","uz","vi","zh","zh-Hant"]; |
|
42 | + private const array LANGUAGE_CODES = ["ar", "as", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fi", "fo", "fr", "ga", "gl", "gn", "gu", "he", "hi", "hr", "hu", "hy", "id", "is", "it", "ja", "ka", "kk", "km", "kn", "ko", "ky", "lt", "lv", "mk", "ml", "mr", "ms", "mt", "my", "nl", "no", "or", "pa", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tr", "uk", "uz", "vi", "zh", "zh-Hant"]; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Name of the map provider. |