Passed
Pull Request — main (#4233)
by David
06:43
created
app/Module/ShareAnniversaryModule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         if ($record instanceof Individual) {
102 102
             $facts = $record->facts(static::INDIVIDUAL_EVENTS, true)
103
-                ->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true)));
103
+                ->merge($record->spouseFamilies()->map(fn(Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true)));
104 104
         } elseif ($record instanceof Family) {
105 105
             $facts = $record->facts(static::FAMILY_EVENTS, true);
106 106
         } else {
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
         // iCalendar only supports exact Gregorian dates.
111 111
         $facts = $facts
112 112
             ->flatten()
113
-            ->filter(fn (Fact $fact): bool => $fact->date()->isOK())
114
-            ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '')
115
-            ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate)
116
-            ->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay())
117
-            ->mapWithKeys(fn (Fact $fact): array => [
113
+            ->filter(fn(Fact $fact): bool => $fact->date()->isOK())
114
+            ->filter(fn(Fact $fact): bool => $fact->date()->qual1 === '')
115
+            ->filter(fn(Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate)
116
+            ->filter(fn(Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay())
117
+            ->mapWithKeys(fn(Fact $fact): array => [
118 118
                 route(static::class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact->id()]) =>
119 119
                     $fact->label() . ' — ' . $fact->date()->display(),
120 120
             ]);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $record  = Auth::checkRecordAccess($record);
147 147
 
148 148
         $fact = $record->facts()
149
-            ->filter(fn (Fact $fact): bool => $fact->id() === $fact_id)
149
+            ->filter(fn(Fact $fact): bool => $fact->id() === $fact_id)
150 150
             ->first();
151 151
 
152 152
         if ($fact instanceof Fact) {
Please login to merge, or discard this patch.
app/Statistics/Repository/IndividualRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -588,7 +588,7 @@
 block discarded – undo
588 588
 
589 589
         $module = $module_service
590 590
             ->findByComponent(ModuleListInterface::class, $this->tree, Auth::user())
591
-            ->first(static fn (ModuleInterface $module): bool => $module instanceof IndividualListModule);
591
+            ->first(static fn(ModuleInterface $module): bool => $module instanceof IndividualListModule);
592 592
 
593 593
         if ($type === 'list') {
594 594
             return view('lists/surnames-bullet-list', [
Please login to merge, or discard this patch.
app/Module/ModuleThemeTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
         $pedigree_chart = $module_service
399 399
             ->findByComponent(ModuleChartInterface::class, $tree, Auth::user())
400
-            ->first(static fn (ModuleInterface $module): bool => $module instanceof PedigreeChartModule);
400
+            ->first(static fn(ModuleInterface $module): bool => $module instanceof PedigreeChartModule);
401 401
 
402 402
         if ($my_xref !== '' && $pedigree_chart instanceof PedigreeChartModule) {
403 403
             $individual = Registry::individualFactory()->make($my_xref, $tree);
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 
487 487
         return $module_service
488 488
             ->findByComponent(ModuleMenuInterface::class, $tree, Auth::user())
489
-            ->map(static fn (ModuleMenuInterface $menu): ?Menu => $menu->getMenu($tree))
489
+            ->map(static fn(ModuleMenuInterface $menu): ?Menu => $menu->getMenu($tree))
490 490
             ->filter()
491 491
             ->all();
492 492
     }
Please login to merge, or discard this patch.
app/Module/FamilyTreeStatisticsModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
             // Find a module providing individual lists
146 146
             $module = $this->module_service
147 147
                 ->findByComponent(ModuleListInterface::class, $tree, Auth::user())
148
-                ->first(static fn (ModuleInterface $module): bool => $module instanceof IndividualListModule);
148
+                ->first(static fn(ModuleInterface $module): bool => $module instanceof IndividualListModule);
149 149
 
150 150
             $surnames = view('lists/surnames-compact-list', [
151 151
                 'module'   => $module,
Please login to merge, or discard this patch.
app/Module/RelationshipsChartModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@
 block discarded – undo
328 328
 
329 329
             $language = $this->module_service
330 330
                 ->findByInterface(ModuleLanguageInterface::class, true)
331
-                ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
331
+                ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
332 332
 
333 333
             echo '<h3>', I18N::translate('Relationship: %s', $this->relationship_service->nameFromPath($nodes->all(), $language)), '</h3>';
334 334
             $num_paths++;
Please login to merge, or discard this patch.
app/Validator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function isBetween(int $minimum, int $maximum): self
104 104
     {
105
-        $this->rules[] = static function (?int $value) use ($minimum, $maximum): ?int {
105
+        $this->rules[] = static function (?int $value) use ($minimum, $maximum) : ?int {
106 106
             if (is_int($value) && $value >= $minimum && $value <= $maximum) {
107 107
                 return $value;
108 108
             }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function isInArray(array $values): self
122 122
     {
123
-        $this->rules[] = static fn (?string $value): ?string => is_string($value) && in_array($value, $values, true) ? $value : null;
123
+        $this->rules[] = static fn(?string $value) : ?string => is_string($value) && in_array($value, $values, true) ? $value : null;
124 124
 
125 125
         return $this;
126 126
     }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function isLocalUrl(string $base_url): self
133 133
     {
134
-        $this->rules[] = static function (?string $value) use ($base_url): ?string {
134
+        $this->rules[] = static function (?string $value) use ($base_url) : ?string {
135 135
             if (is_string($value)) {
136 136
                 $value_info    = parse_url($value);
137 137
                 $base_url_info = parse_url($base_url);
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             throw new HttpBadRequestException(I18N::translate('The parameter ā€œ%sā€ is missing.', $parameter));
230 230
         }
231 231
 
232
-        $callback = static fn (?array $value, Closure $rule): ?array => $rule($value);
232
+        $callback = static fn(?array $value, Closure $rule) : ?array => $rule($value);
233 233
 
234 234
         $value = array_reduce($this->rules, $callback, $value);
235 235
         $value ??= [];
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             $value = null;
262 262
         }
263 263
 
264
-        $callback = static fn (?int $value, Closure $rule): ?int => $rule($value);
264
+        $callback = static fn(?int $value, Closure $rule) : ?int => $rule($value);
265 265
 
266 266
         $value = array_reduce($this->rules, $callback, $value);
267 267
 
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
             $value = null;
305 305
         }
306 306
 
307
-        $callback = static fn (?string $value, Closure $rule): ?string => $rule($value);
307
+        $callback = static fn(?string $value, Closure $rule) : ?string => $rule($value);
308 308
 
309
-        $value =  array_reduce($this->rules, $callback, $value);
309
+        $value = array_reduce($this->rules, $callback, $value);
310 310
         $value ??= $default;
311 311
 
312 312
         if ($value === null || preg_match('//u', $value) !== 1) {
Please login to merge, or discard this patch.
app/Module/PlaceHierarchyListModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@
 block discarded – undo
266 266
         $sidebar   = '';
267 267
 
268 268
         if ($places === []) {
269
-            $places[]  = $placeObj;
269
+            $places[] = $placeObj;
270 270
         }
271 271
 
272 272
         foreach ($places as $id => $place) {
Please login to merge, or discard this patch.