Passed
Pull Request — main (#4103)
by Jonathan
07:09
created
app/Http/RequestHandlers/SearchAdvancedPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,9 +198,9 @@
 block discarded – undo
198 198
         };
199 199
 
200 200
         return $default_facts
201
-            ->reject(fn (string $field): bool => array_key_exists($field, $fields))
201
+            ->reject(fn(string $field): bool => array_key_exists($field, $fields))
202 202
             ->sort($comparator)
203
-            ->mapWithKeys(fn (string $fact): array => [$fact => Registry::elementFactory()->make($fact)->label()])
203
+            ->mapWithKeys(fn(string $fact): array => [$fact => Registry::elementFactory()->make($fact)->label()])
204 204
             ->all();
205 205
     }
206 206
 
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AutoCompleteFolder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
         try {
58 58
             return $this->media_file_service->mediaFolders($tree)
59
-                ->filter(fn (string $path): bool => stripos($path, $query) !== false);
59
+                ->filter(fn(string $path): bool => stripos($path, $query) !== false);
60 60
         } catch (FilesystemException $ex) {
61 61
             return new Collection();
62 62
         }
Please login to merge, or discard this patch.
app/Functions/FunctionsRtl.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                         $currentLen        = $endPos + 2;
187 187
                         $directive         = substr($workingText, 0, $currentLen);
188 188
                         $workingText       = substr($workingText, $currentLen);
189
-                        $result            .= self::$waitingText . $directive;
189
+                        $result .= self::$waitingText . $directive;
190 190
                         self::$waitingText = '';
191 191
                         break;
192 192
                     }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                         if ($openParIndex !== false) {
300 300
                             // Opening parentheses always inherit the following directionality
301 301
                             self::$waitingText .= $currentLetter;
302
-                            $workingText       = substr($workingText, $currentLen);
302
+                            $workingText = substr($workingText, $currentLen);
303 303
                             while (true) {
304 304
                                 if ($workingText === '') {
305 305
                                     break;
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
                                 if (substr($workingText, 0, 1) === ' ') {
308 308
                                     // Spaces following this left parenthesis inherit the following directionality too
309 309
                                     self::$waitingText .= ' ';
310
-                                    $workingText       = substr($workingText, 1);
310
+                                    $workingText = substr($workingText, 1);
311 311
                                     continue;
312 312
                                 }
313 313
                                 if (substr($workingText, 0, 6) === ' ') {
314 314
                                     // Spaces following this left parenthesis inherit the following directionality too
315 315
                                     self::$waitingText .= ' ';
316
-                                    $workingText       = substr($workingText, 6);
316
+                                    $workingText = substr($workingText, 6);
317 317
                                     continue;
318 318
                                 }
319 319
                                 break;
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
                         // Exceptions to this rule will be handled later during final clean-up.
331 331
                         //
332 332
                         self::$waitingText .= $currentLetter;
333
-                        $workingText       = substr($workingText, $currentLen);
333
+                        $workingText = substr($workingText, $currentLen);
334 334
                         if (self::$currentState !== '') {
335
-                            $result            .= self::$waitingText;
335
+                            $result .= self::$waitingText;
336 336
                             self::$waitingText = '';
337 337
                         }
338 338
                         break 2; // double break because we're waiting for more information
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
                 }
464 464
                 if (substr($result . "\n", 0, self::LENGTH_START) !== self::START_LTR && substr($result . "\n", 0, self::LENGTH_START) !== self::START_RTL) {
465 465
                     $leadingText .= substr($result, 0, 1);
466
-                    $result      = substr($result, 1);
466
+                    $result = substr($result, 1);
467 467
                     continue;
468 468
                 }
469 469
                 $result = substr($result, 0, self::LENGTH_START) . $leadingText . substr($result, self::LENGTH_START);
@@ -600,11 +600,11 @@  discard block
 block discarded – undo
600 600
     public static function breakCurrentSpan(string &$result): void
601 601
     {
602 602
         // Interrupt the current span, insert that <br>, and then continue the current span
603
-        $result            .= self::$waitingText;
603
+        $result .= self::$waitingText;
604 604
         self::$waitingText = '';
605 605
 
606 606
         $breakString = '<' . self::$currentState . 'br>';
607
-        $result      .= $breakString;
607
+        $result .= $breakString;
608 608
     }
609 609
 
610 610
     /**
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
                 break;
662 662
             } // No more numeric strings
663 663
 
664
-            $tempResult    .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string
664
+            $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string
665 665
             $numericString = substr($textSpan, $posLRE + 3, $posPDF - $posLRE); // Separate the entire numeric string
666 666
             $textSpan      = substr($textSpan, $posPDF + 3);
667 667
             $posColon      = strpos($numericString, ':');
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
 
1129 1129
             // We're done: finish the span
1130 1130
             $textSpan = self::starredName($textSpan, 'RTL'); // Wrap starred name in <u> and </u> tags
1131
-            $result   .= $textSpan . self::END_RTL;
1131
+            $result .= $textSpan . self::END_RTL;
1132 1132
         }
1133 1133
 
1134 1134
         if (self::$currentState !== 'LTR' && self::$currentState !== 'RTL') {
Please login to merge, or discard this patch.
app/Functions/FunctionsPrintLists.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
      */
50 50
     public static function surnameTagCloud(array $surnames, ?ModuleListInterface $module, bool $totals, Tree $tree): string
51 51
     {
52
-        $maximum = max(array_map(static fn (array $x): int => max($x), $surnames));
53
-        $minimum = min(array_map(static fn (array $x): int => min($x), $surnames));
52
+        $maximum = max(array_map(static fn(array $x) : int => max($x), $surnames));
53
+        $minimum = min(array_map(static fn(array $x): int => min($x), $surnames));
54 54
 
55 55
         $tag_cloud = '';
56 56
 
Please login to merge, or discard this patch.
app/Report/HtmlRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -726,7 +726,7 @@
 block discarded – undo
726 726
 
727 727
         $lines = explode("\n", $str);
728 728
 
729
-        $lines = array_map(fn (string $string): string => $this->utf8WordWrap($string, $line_width), $lines);
729
+        $lines = array_map(fn(string $string): string => $this->utf8WordWrap($string, $line_width), $lines);
730 730
 
731 731
         return implode("\n", $lines);
732 732
     }
Please login to merge, or discard this patch.
app/Http/Middleware/BadBotBlocker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
259 259
     private function fetchIpRangesForAsn(string $asn): array
260 260
     {
261 261
         return Registry::cache()->file()->remember('whois-asn-' . $asn, static function () use ($asn): array {
262
-            $mapper = static fn (AsnRouteInfo $route_info): ?RangeInterface => IPFactory::parseRangeString($route_info->route ?: $route_info->route6);
262
+            $mapper = static fn(AsnRouteInfo $route_info): ?RangeInterface => IPFactory::parseRangeString($route_info->route ?: $route_info->route6);
263 263
 
264 264
             try {
265 265
                 $loader = new CurlLoader(self::WHOIS_TIMEOUT);
Please login to merge, or discard this patch.
app/Http/RequestHandlers/TreePreferencesPage.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -173,19 +173,19 @@
 block discarded – undo
173 173
         $ignore_facts = ['CHAN', 'CHIL', 'FAMC', 'FAMS', 'HUSB', 'NOTE', 'OBJE', 'SOUR', 'SUBM', 'WIFE'];
174 174
 
175 175
         $all_family_facts = Collection::make(Registry::elementFactory()->make('FAM')->subtags())
176
-            ->filter(static fn (string $value, string $key): bool => !in_array($key, $ignore_facts, true))
177
-            ->mapWithKeys(static fn (string $value, string $key): array => [$key => 'FAM:' . $key])
178
-            ->map(static fn (string $tag): ElementInterface => Registry::elementFactory()->make($tag))
179
-            ->filter(static fn (ElementInterface $element): bool => !$element instanceof UnknownElement)
180
-            ->map(static fn (ElementInterface $element): string => $element->label())
176
+            ->filter(static fn(string $value, string $key): bool => !in_array($key, $ignore_facts, true))
177
+            ->mapWithKeys(static fn(string $value, string $key): array => [$key => 'FAM:' . $key])
178
+            ->map(static fn(string $tag): ElementInterface => Registry::elementFactory()->make($tag))
179
+            ->filter(static fn(ElementInterface $element): bool => !$element instanceof UnknownElement)
180
+            ->map(static fn(ElementInterface $element): string => $element->label())
181 181
             ->sort(I18N::comparator());
182 182
 
183 183
         $all_individual_facts = Collection::make(Registry::elementFactory()->make('INDI')->subtags())
184
-            ->filter(static fn (string $value, string $key): bool => !in_array($key, $ignore_facts, true))
185
-            ->mapWithKeys(static fn (string $value, string $key): array => [$key => 'INDI:' . $key])
186
-            ->map(static fn (string $tag): ElementInterface => Registry::elementFactory()->make($tag))
187
-            ->filter(static fn (ElementInterface $element): bool => !$element instanceof UnknownElement)
188
-            ->map(static fn (ElementInterface $element): string => $element->label())
184
+            ->filter(static fn(string $value, string $key): bool => !in_array($key, $ignore_facts, true))
185
+            ->mapWithKeys(static fn(string $value, string $key): array => [$key => 'INDI:' . $key])
186
+            ->map(static fn(string $tag): ElementInterface => Registry::elementFactory()->make($tag))
187
+            ->filter(static fn(ElementInterface $element): bool => !$element instanceof UnknownElement)
188
+            ->map(static fn(ElementInterface $element): string => $element->label())
189 189
             ->sort(I18N::comparator());
190 190
 
191 191
         $all_surname_traditions = SurnameTradition::allDescriptions();
Please login to merge, or discard this patch.
app/Services/MapDataService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
                     ->where('id', '=', $location->id)
203 203
                     ->delete();
204 204
             } else {
205
-                $place_ids = $places->map(static fn (object $place): int => (int) $place->p_id)->all();
205
+                $place_ids = $places->map(static fn(object $place): int => (int) $place->p_id)->all();
206 206
                 $this->deleteUnusedLocations((int) $location->id, $place_ids);
207 207
             }
208 208
         }
Please login to merge, or discard this patch.
app/Module/ModuleMapAutocompleteTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         } catch (GuzzleException $ex) {
67 67
             // Service down?  Quota exceeded?
68 68
             // Don't try for another hour.
69
-            $cache->remember($key, fn () => [], 3600);
69
+            $cache->remember($key, fn() => [], 3600);
70 70
 
71 71
             return [];
72 72
         }
Please login to merge, or discard this patch.