Passed
Push — validation ( 1c78f5...5db15e )
by Greg
08:11
created
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/Http/RequestHandlers/IndividualPage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $shares = $this->module_service
135 135
             ->findByInterface(ModuleShareInterface::class)
136
-            ->map(fn (ModuleShareInterface $module) => $module->share($individual))
136
+            ->map(fn(ModuleShareInterface $module) => $module->share($individual))
137 137
             ->filter();
138 138
 
139 139
         return $this->viewResponse('individual-page', [
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
             }
242 242
         }
243 243
 
244
-        $meta_facts = array_map(static fn (string $x): string => strip_tags($x), $meta_facts);
245
-        $meta_facts = array_map(static fn (string $x): string => trim($x), $meta_facts);
244
+        $meta_facts = array_map(static fn(string $x): string => strip_tags($x), $meta_facts);
245
+        $meta_facts = array_map(static fn(string $x): string => trim($x), $meta_facts);
246 246
 
247 247
         return implode(', ', $meta_facts);
248 248
     }
Please login to merge, or discard this patch.
app/Http/RequestHandlers/FamilyPage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -154,15 +154,15 @@
 block discarded – undo
154 154
 
155 155
         if ($family->children()->isNotEmpty()) {
156 156
             $child_names = $family->children()
157
-            ->map(static fn (Individual $individual): string => e($individual->getAllNames()[0]['givn']))
158
-            ->filter(static fn (string $x): bool => $x !== Individual::PRAENOMEN_NESCIO)
157
+            ->map(static fn(Individual $individual): string => e($individual->getAllNames()[0]['givn']))
158
+            ->filter(static fn(string $x): bool => $x !== Individual::PRAENOMEN_NESCIO)
159 159
             ->implode(', ');
160 160
 
161 161
             $meta_facts[] = I18N::translate('Children') . ' ' . $child_names;
162 162
         }
163 163
 
164
-        $meta_facts = array_map(static fn (string $x): string => strip_tags($x), $meta_facts);
165
-        $meta_facts = array_map(static fn (string $x): string => trim($x), $meta_facts);
164
+        $meta_facts = array_map(static fn(string $x): string => strip_tags($x), $meta_facts);
165
+        $meta_facts = array_map(static fn(string $x): string => trim($x), $meta_facts);
166 166
 
167 167
         return implode(', ', $meta_facts);
168 168
     }
Please login to merge, or discard this patch.
app/Report/ReportParserGenerate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1842,7 +1842,7 @@
 block discarded – undo
1842 1842
                             ->groupBy(['xref']);
1843 1843
                     })
1844 1844
                     ->get()
1845
-                    ->map(fn (object $row): ?GedcomRecord => Registry::gedcomRecordFactory()->make($row->xref, $this->tree, $row->new_gedcom ?: $row->old_gedcom))
1845
+                    ->map(fn(object $row): ?GedcomRecord => Registry::gedcomRecordFactory()->make($row->xref, $this->tree, $row->new_gedcom ?: $row->old_gedcom))
1846 1846
                     ->filter()
1847 1847
                     ->all();
1848 1848
                 break;
Please login to merge, or discard this patch.
app/Services/ClipboardService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         return (new Collection($facts))
108 108
             ->reverse()
109
-            ->map(static fn (string $clipping): Fact => new Fact($clipping, $record, md5($clipping)));
109
+            ->map(static fn(string $clipping): Fact => new Fact($clipping, $record, md5($clipping)));
110 110
     }
111 111
 
112 112
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         return (new Collection($clipboard))
127 127
             ->flatten(1)
128 128
             ->reverse()
129
-            ->map(static fn (string $clipping): Fact => new Fact($clipping, $record, md5($clipping)))
130
-            ->filter(static fn (Fact $fact): bool => $types->contains(explode(':', $fact->tag())[1]));
129
+            ->map(static fn(string $clipping): Fact => new Fact($clipping, $record, md5($clipping)))
130
+            ->filter(static fn(Fact $fact): bool => $types->contains(explode(':', $fact->tag())[1]));
131 131
     }
132 132
 }
Please login to merge, or discard this patch.
app/Date/AbstractCalendarDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
             $this->month = static::MONTH_TO_NUMBER[$date[1]] ?? 0;
100 100
 
101 101
             if ($this->month === 0) {
102
-                $this->day   = 0;
102
+                $this->day = 0;
103 103
             }
104 104
 
105 105
             $this->year = $this->extractYear($date[0]);
Please login to merge, or discard this patch.
app/Services/ServerCheckService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
         $function = strtolower($function);
163 163
 
164 164
         $disable_functions = explode(',', (string) ini_get('disable_functions'));
165
-        $disable_functions = array_map(static fn (string $func): string => strtolower(trim($func)), $disable_functions);
165
+        $disable_functions = array_map(static fn(string $func): string => strtolower(trim($func)), $disable_functions);
166 166
 
167 167
         return in_array($function, $disable_functions, true) || !function_exists($function);
168 168
     }
Please login to merge, or discard this patch.
app/Module/UserJournalModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
                 throw new HttpNotFoundException(I18N::translate('%s does not exist.', 'news_id:' . $news_id));
180 180
             }
181 181
         } else {
182
-            $row = (object)['body' => '', 'subject' => ''];
182
+            $row = (object) ['body' => '', 'subject' => ''];
183 183
         }
184 184
 
185 185
         $title = I18N::translate('Add/edit a journal/news entry');
Please login to merge, or discard this patch.
app/Elements/AgeAtEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,10 +88,10 @@
 block discarded – undo
88 88
         }
89 89
 
90 90
         return preg_replace_callback_array([
91
-            '/\b(\d+)y\b/' => fn (array $match) => I18N::plural('%s year', '%s years', (int) $match[1], I18N::number((float) $match[1])),
92
-            '/\b(\d+)m\b/' => fn (array $match) => I18N::plural('%s month', '%s months', (int) $match[1], I18N::number((float) $match[1])),
93
-            '/\b(\d+)w\b/' => fn (array $match) => I18N::plural('%s week', '%s weeks', (int) $match[1], I18N::number((float) $match[1])),
94
-            '/\b(\d+)d\b/' => fn (array $match) => I18N::plural('%s day', '%s days', (int) $match[1], I18N::number((float) $match[1])),
91
+            '/\b(\d+)y\b/' => fn(array $match) => I18N::plural('%s year', '%s years', (int) $match[1], I18N::number((float) $match[1])),
92
+            '/\b(\d+)m\b/' => fn(array $match) => I18N::plural('%s month', '%s months', (int) $match[1], I18N::number((float) $match[1])),
93
+            '/\b(\d+)w\b/' => fn(array $match) => I18N::plural('%s week', '%s weeks', (int) $match[1], I18N::number((float) $match[1])),
94
+            '/\b(\d+)d\b/' => fn(array $match) => I18N::plural('%s day', '%s days', (int) $match[1], I18N::number((float) $match[1])),
95 95
         ], e($canonical));
96 96
     }
97 97
 }
Please login to merge, or discard this patch.