Passed
Branch main (c0cdda)
by Greg
09:08 queued 01:53
created
app/Module/IndividualMetadataModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,6 +117,6 @@
 block discarded – undo
117 117
      */
118 118
     public function supportedFacts(): Collection
119 119
     {
120
-        return new Collection(array_map(static fn (string $tag): string => 'INDI:' . $tag, static::HANDLED_FACTS));
120
+        return new Collection(array_map(static fn(string $tag): string => 'INDI:' . $tag, static::HANDLED_FACTS));
121 121
     }
122 122
 }
Please login to merge, or discard this patch.
app/Module/LanguageFrench.php 1 patch
Spacing   +29 added lines, -30 removed lines patch added patch discarded remove patch
@@ -110,24 +110,24 @@  discard block
 block discarded – undo
110 110
     public function relationships(): array
111 111
     {
112 112
         // Construct the genitive form in French
113
-        $genitive = static fn (string $s, string $genitive_link): array => [$s, '%s ' . $genitive_link . $s];
113
+        $genitive = static fn(string $s, string $genitive_link): array => [$s, '%s ' . $genitive_link . $s];
114 114
 
115 115
         // Functions to coumpound the name that can be indefinitely repeated
116
-        $degree = static fn (int $n, string $suffix, string $genitive_link): array =>
116
+        $degree = static fn(int $n, string $suffix, string $genitive_link): array =>
117 117
                 $genitive("$suffix au {$n}<sup>e</sup> degré", $genitive_link);
118 118
 
119
-        $great = static fn (int $n, string $suffix, string $genitive_link): array =>
119
+        $great = static fn(int $n, string $suffix, string $genitive_link): array =>
120 120
                 $n <= 1 ? $genitive('arrière-' . $suffix, 'de l’') : $degree($n + 1, $suffix, $genitive_link);
121 121
 
122
-        $firstCompound = static fn (int $n, string $suffix, string $genitive_link): array =>
122
+        $firstCompound = static fn(int $n, string $suffix, string $genitive_link): array =>
123 123
                 $n <= 1 ? $genitive($suffix, $genitive_link) : $great($n - 1, $suffix, $genitive_link);
124 124
 
125 125
         $compound =
126
-            static fn (int $n, string $first_level, string $suffix, string $genitive_none, string $genitive_first): array =>
126
+            static fn(int $n, string $first_level, string $suffix, string $genitive_none, string $genitive_first): array =>
127 127
                 $n <= 1 ? $genitive($suffix, $genitive_none) : $firstCompound($n - 1, $first_level . $suffix, $genitive_first);
128 128
 
129 129
         // Functions to translate cousins' degree of relationship
130
-        $symmetricCousin = static fn (int $n, string $sex): array => self::SYMMETRIC_COUSINS[$n][$sex] ?? $genitive(
130
+        $symmetricCousin = static fn(int $n, string $sex): array => self::SYMMETRIC_COUSINS[$n][$sex] ?? $genitive(
131 131
             $sex === 'F' ? 'cousine au ' . $n . '<sup>e</sup> degré' : 'cousin au ' . $n . '<sup>e</sup> degré',
132 132
             $sex === 'F' ? 'de la ' : 'du '
133 133
         );
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
                 }
145 145
                 return $genitive(
146 146
                     $sex === 'F' ?
147
-                        'cousine du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré' :
148
-                        'cousin du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré',
147
+                        'cousine du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré' : 'cousin du ' . $down . '<sup>e</sup> au ' . $up . '<sup>e</sup> degré',
149 148
                     $sex === 'F' ? 'de la ' : 'du '
150 149
                 );
151 150
             };
@@ -247,31 +246,31 @@  discard block
 block discarded – undo
247 246
             Relationship::fixed('trisaïeul paternel', '%s du trisaïeul paternel')->father()->parent()->parent()->father(),
248 247
             Relationship::fixed('trisaïeule', '%s de la trisaïeule')->parent()->parent()->parent()->mother(),
249 248
             Relationship::fixed('trisaïeul', '%s du trisaïeul')->parent()->parent()->parent()->father(),
250
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère maternelle', 'de la '))->mother()->ancestor()->female(),
251
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père maternel', 'du '))->mother()->ancestor()->male(),
252
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent maternel', 'du '))->mother()->ancestor(),
253
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère paternelle', 'de la '))->father()->ancestor()->female(),
254
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père paternel', 'du '))->father()->ancestor()->male(),
255
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent paternel', 'du '))->father()->ancestor(),
256
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-mère', 'de la '))->parent()->ancestor()->female(),
257
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-père', 'du '))->parent()->ancestor()->male(),
258
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'grand-parent', 'du '))->parent()->ancestor(),
249
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère maternelle', 'de la '))->mother()->ancestor()->female(),
250
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père maternel', 'du '))->mother()->ancestor()->male(),
251
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent maternel', 'du '))->mother()->ancestor(),
252
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère paternelle', 'de la '))->father()->ancestor()->female(),
253
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père paternel', 'du '))->father()->ancestor()->male(),
254
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent paternel', 'du '))->father()->ancestor(),
255
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-mère', 'de la '))->parent()->ancestor()->female(),
256
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-père', 'du '))->parent()->ancestor()->male(),
257
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'grand-parent', 'du '))->parent()->ancestor(),
259 258
             // Grandchildren and below
260
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petite-fille', 'de la '))->child()->descendant()->female(),
261
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petit-fils', 'du '))->child()->descendant()->male(),
262
-            Relationship::dynamic(fn (int $n) => $firstCompound($n, 'petit-enfant', 'du '))->child()->descendant(),
259
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petite-fille', 'de la '))->child()->descendant()->female(),
260
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petit-fils', 'du '))->child()->descendant()->male(),
261
+            Relationship::dynamic(fn(int $n) => $firstCompound($n, 'petit-enfant', 'du '))->child()->descendant(),
263 262
             // Collateral relatives
264
-            Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'tante', 'de la ', 'de la '))->ancestor()->sister(),
265
-            Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'tante par alliance', 'de la ', 'de la '))->ancestor()->sibling()->wife(),
266
-            Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'oncle', 'de l’', 'du '))->ancestor()->brother(),
267
-            Relationship::dynamic(fn (int $n) => $compound($n, 'grand-', 'oncle par alliance', 'de l’', 'du '))->ancestor()->sibling()->husband(),
268
-            Relationship::dynamic(fn (int $n) => $compound($n, 'petite-', 'nièce', 'de la ', 'de la '))->sibling()->descendant()->female(),
269
-            Relationship::dynamic(fn (int $n) => $compound($n, 'petite-', 'nièce par alliance', 'de la ', 'de la '))->married()->spouse()->sibling()->descendant()->female(),
270
-            Relationship::dynamic(fn (int $n) => $compound($n, 'petit-', 'neveu', 'du ', 'du '))->sibling()->descendant()->male(),
271
-            Relationship::dynamic(fn (int $n) => $compound($n, 'petit-', 'neveu par alliance', 'du ', 'du '))->married()->spouse()->sibling()->descendant()->male(),
263
+            Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'tante', 'de la ', 'de la '))->ancestor()->sister(),
264
+            Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'tante par alliance', 'de la ', 'de la '))->ancestor()->sibling()->wife(),
265
+            Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'oncle', 'de l’', 'du '))->ancestor()->brother(),
266
+            Relationship::dynamic(fn(int $n) => $compound($n, 'grand-', 'oncle par alliance', 'de l’', 'du '))->ancestor()->sibling()->husband(),
267
+            Relationship::dynamic(fn(int $n) => $compound($n, 'petite-', 'nièce', 'de la ', 'de la '))->sibling()->descendant()->female(),
268
+            Relationship::dynamic(fn(int $n) => $compound($n, 'petite-', 'nièce par alliance', 'de la ', 'de la '))->married()->spouse()->sibling()->descendant()->female(),
269
+            Relationship::dynamic(fn(int $n) => $compound($n, 'petit-', 'neveu', 'du ', 'du '))->sibling()->descendant()->male(),
270
+            Relationship::dynamic(fn(int $n) => $compound($n, 'petit-', 'neveu par alliance', 'du ', 'du '))->married()->spouse()->sibling()->descendant()->male(),
272 271
             // Cousins (based on canon law)
273
-            Relationship::dynamic(fn (int $up, int $down) => $cousin($up, $down, 'F'))->cousin()->female(),
274
-            Relationship::dynamic(fn (int $up, int $down) => $cousin($up, $down, 'M'))->cousin()->male(),
272
+            Relationship::dynamic(fn(int $up, int $down) => $cousin($up, $down, 'F'))->cousin()->female(),
273
+            Relationship::dynamic(fn(int $up, int $down) => $cousin($up, $down, 'M'))->cousin()->male(),
275 274
 
276 275
         ];
277 276
     }
Please login to merge, or discard this patch.
app/Module/LanguageEnglishUnitedStates.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
     public function relationships(): array
119 119
     {
120 120
         // Genitive forms in English are simple/regular, as no relationship name ends in "s".
121
-        $genitive = static fn (string $s): array => [$s, $s . '’s %s'];
121
+        $genitive = static fn(string $s): array => [$s, $s . '’s %s'];
122 122
 
123
-        $cousin = fn (int $up, int $down): array => $genitive(
123
+        $cousin = fn(int $up, int $down): array => $genitive(
124 124
             (static::COUSIN[min($up, $down)] ?? 'distant cousin') .
125 125
             (static::REMOVED[abs($up - $down)] ?? ' many times removed') .
126 126
             static::DIRECTION[$up <=> $down]
127 127
         );
128 128
 
129
-        $great = static fn (int $n, string $prefix, string $suffix): array => $genitive(
129
+        $great = static fn(int $n, string $prefix, string $suffix): array => $genitive(
130 130
             $prefix . ($n > 3 ? 'great ×' . $n . ' ' : str_repeat('great-', $n)) . $suffix
131 131
         );
132 132
 
@@ -221,22 +221,22 @@  discard block
 block discarded – undo
221 221
             Relationship::fixed('grandson', 'grandson’s %s')->child()->son(),
222 222
             Relationship::fixed('grandchild', 'grandchild’s %s')->child()->child(),
223 223
             // Relationships with dynamically generated names
224
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sister(),
225
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sibling()->wife(),
226
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->brother(),
227
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->sibling()->husband(),
228
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'niece'))->sibling()->descendant()->female(),
229
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'niece'))->married()->spouse()->sibling()->descendant()->female(),
230
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'nephew'))->sibling()->descendant()->male(),
231
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'nephew'))->married()->spouse()->sibling()->descendant()->male(),
232
-            Relationship::dynamic(fn (int $n) => $great($n - 2, 'maternal ', 'grandmother'))->mother()->ancestor()->female(),
233
-            Relationship::dynamic(fn (int $n) => $great($n - 1, 'maternal ', 'grandfather'))->mother()->ancestor()->male(),
234
-            Relationship::dynamic(fn (int $n) => $great($n - 1, 'paternal ', 'grandmother'))->father()->ancestor()->female(),
235
-            Relationship::dynamic(fn (int $n) => $great($n - 1, 'paternal ', 'grandfather'))->father()->ancestor()->male(),
236
-            Relationship::dynamic(fn (int $n) => $great($n - 1, '', 'grandparent'))->ancestor(),
237
-            Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'granddaughter'))->descendant()->female(),
238
-            Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'grandson'))->descendant()->male(),
239
-            Relationship::dynamic(fn (int $n) => $great($n - 2, '', 'grandchild'))->descendant(),
224
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sister(),
225
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sibling()->wife(),
226
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'uncle'))->ancestor()->brother(),
227
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'uncle'))->ancestor()->sibling()->husband(),
228
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'niece'))->sibling()->descendant()->female(),
229
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'niece'))->married()->spouse()->sibling()->descendant()->female(),
230
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'nephew'))->sibling()->descendant()->male(),
231
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'nephew'))->married()->spouse()->sibling()->descendant()->male(),
232
+            Relationship::dynamic(fn(int $n) => $great($n - 2, 'maternal ', 'grandmother'))->mother()->ancestor()->female(),
233
+            Relationship::dynamic(fn(int $n) => $great($n - 1, 'maternal ', 'grandfather'))->mother()->ancestor()->male(),
234
+            Relationship::dynamic(fn(int $n) => $great($n - 1, 'paternal ', 'grandmother'))->father()->ancestor()->female(),
235
+            Relationship::dynamic(fn(int $n) => $great($n - 1, 'paternal ', 'grandfather'))->father()->ancestor()->male(),
236
+            Relationship::dynamic(fn(int $n) => $great($n - 1, '', 'grandparent'))->ancestor(),
237
+            Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'granddaughter'))->descendant()->female(),
238
+            Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'grandson'))->descendant()->male(),
239
+            Relationship::dynamic(fn(int $n) => $great($n - 2, '', 'grandchild'))->descendant(),
240 240
             Relationship::dynamic($cousin)->ancestor()->sibling()->descendant(),
241 241
         ];
242 242
     }
Please login to merge, or discard this patch.
app/Functions/FunctionsPrint.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                     if ($note->canShow()) {
162 162
                         $noterec = $note->gedcom();
163 163
                         $nt      = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
164
-                        $data    .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
164
+                        $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
165 165
                     }
166 166
                 } else {
167 167
                     $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>';
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                 if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) {
380 380
                     foreach ($matches[1] as $match) {
381 381
                         $wt_place = new Place($match, $tree);
382
-                        $html     .= ' - ' . $wt_place->fullName();
382
+                        $html .= ' - ' . $wt_place->fullName();
383 383
                     }
384 384
                 }
385 385
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
                     // Links to external maps
394 394
                     $html .= app(ModuleService::class)
395 395
                         ->findByInterface(ModuleMapLinkInterface::class)
396
-                        ->map(fn (ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event))
396
+                        ->map(fn(ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event))
397 397
                         ->implode('');
398 398
                 }
399 399
 
@@ -492,13 +492,13 @@  discard block
 block discarded – undo
492 492
         }
493 493
 
494 494
         // Filter existing tags
495
-        $filter_fn = static fn (string $tag): bool => !in_array($tag, $unique_facts, true) || $record->facts([$tag])->isEmpty();
495
+        $filter_fn = static fn(string $tag): bool => !in_array($tag, $unique_facts, true) || $record->facts([$tag])->isEmpty();
496 496
 
497 497
         $quick_facts = array_filter($quick_facts, $filter_fn);
498 498
 
499 499
 
500 500
         // Create a label for a subtag
501
-        $label_fn = static fn (string $subtag): string => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label();
501
+        $label_fn = static fn(string $subtag): string => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label();
502 502
 
503 503
         $quick_facts = array_combine($quick_facts, array_map($label_fn, $quick_facts));
504 504
         $add_facts   = array_combine($add_facts, array_map($label_fn, $add_facts));
Please login to merge, or discard this patch.
app/Elements/AbstractElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
             }
149 149
 
150 150
             // We may use markup to display values, but not when editing them.
151
-            $values = array_map(static fn (string $x): string => strip_tags($x), $values);
151
+            $values = array_map(static fn(string $x): string => strip_tags($x), $values);
152 152
 
153 153
             return view('components/select', [
154 154
                 'id'       => $id,
Please login to merge, or discard this patch.
app/Http/RequestHandlers/UnconnectedPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         foreach ($components as $component) {
100 100
             // Allow for upper/lower-case mismatches, and all-numeric XREFs
101
-            $component = array_map(static fn ($x): string => strtolower((string) $x), $component);
101
+            $component = array_map(static fn($x): string => strtolower((string) $x), $component);
102 102
 
103 103
             if (!in_array(strtolower($xref), $component, true)) {
104 104
                 $individual_groups[] = DB::table('individuals')
Please login to merge, or discard this patch.