Passed
Pull Request — main (#4103)
by Jonathan
07:09
created
app/Http/RequestHandlers/AddParentToIndividualPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         // Default names facts.
81 81
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
82 82
         $names             = $surname_tradition->newParentNames($individual, $sex);
83
-        $name_facts        = array_map(static fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
83
+        $name_facts        = array_map(static fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
84 84
 
85 85
         $facts = [
86 86
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddSpouseToIndividualPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         // Default names facts.
87 87
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
88 88
         $names             = $surname_tradition->newSpouseNames($individual, $sex);
89
-        $name_facts        = array_map(static fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
89
+        $name_facts        = array_map(static fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
90 90
 
91 91
         $facts = [
92 92
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/SearchReplaceAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 
95 95
             case 'name':
96 96
                 $name_tags = Registry::elementFactory()->make('INDI:NAME')->subtags();
97
-                $name_tags = array_map(static fn (string $tag): string => '2 ' . $tag, $name_tags);
97
+                $name_tags = array_map(static fn(string $tag): string => '2 ' . $tag, $name_tags);
98 98
                 $name_tags[] = '1 NAME';
99 99
 
100 100
                 $records = $this->search_service->searchIndividuals([$tree], [$search]);
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddSpouseToFamilyPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $spouse            = $family->spouses()->first();
85 85
         assert($spouse instanceof Individual);
86 86
         $names      = $surname_tradition->newSpouseNames($spouse, $sex);
87
-        $name_facts = array_map(static fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
87
+        $name_facts = array_map(static fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
88 88
 
89 89
         $facts = [
90 90
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddChildToIndividualPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 break;
92 92
         }
93 93
 
94
-        $name_facts = array_map(static fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
94
+        $name_facts = array_map(static fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
95 95
 
96 96
         $facts = [
97 97
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddChildToFamilyPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         // Default names facts.
81 81
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
82 82
         $names             = $surname_tradition->newChildNames($family->husband(), $family->wife(), $sex);
83
-        $name_facts        = array_map(static fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
83
+        $name_facts        = array_map(static fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
84 84
 
85 85
         $facts = [
86 86
             'i' => [
Please login to merge, or discard this patch.
app/Module/TopSurnamesModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 ->groupBy(['surname'])
114 114
                 ->select([new Expression('n_surname /*! COLLATE utf8_bin */ AS surname'), new Expression('count(*) AS total')])
115 115
                 ->pluck('total', 'surname')
116
-                ->map(static fn (string $n): int => (int) $n)
116
+                ->map(static fn(string $n): int => (int) $n)
117 117
                 ->all();
118 118
 
119 119
             $all_surnames[$top_surname] = $variants;
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
                 $content = FunctionsPrintLists::surnameTagCloud($all_surnames, $module, true, $tree);
136 136
                 break;
137 137
             case 'list':
138
-                uasort($all_surnames, static fn (array $a, array $b): int => array_sum($b) <=> array_sum($a));
138
+                uasort($all_surnames, static fn(array $a, array $b): int => array_sum($b) <=> array_sum($a));
139 139
                 $content = FunctionsPrintLists::surnameList($all_surnames, 1, true, $module, $tree);
140 140
                 break;
141 141
             case 'array':
142
-                uasort($all_surnames, static fn (array $a, array $b): int => array_sum($b) <=> array_sum($a));
142
+                uasort($all_surnames, static fn(array $a, array $b): int => array_sum($b) <=> array_sum($a));
143 143
                 $content = FunctionsPrintLists::surnameList($all_surnames, 2, true, $module, $tree);
144 144
                 break;
145 145
             case 'table':
Please login to merge, or discard this patch.
app/Module/LanguageSlovakian.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function relationships(): array
88 88
     {
89
-        $pra = static fn (int $n, string $nominative, string $genitive): array => [
89
+        $pra = static fn(int $n, string $nominative, string $genitive): array => [
90 90
             ($n > 3 ? 'pra ×' . $n . ' ' : str_repeat('pra-', $n)) . $nominative,
91 91
             ($n > 3 ? 'pra ×' . $n . ' ' : str_repeat('pra-', $n)) . $genitive,
92 92
         ];
93 93
 
94
-        $cousin = static fn (int $n, array $cousins, string $nominative, string $genitive): array => $cousins[$n] ?? [
94
+        $cousin = static fn(int $n, array $cousins, string $nominative, string $genitive): array => $cousins[$n] ?? [
95 95
             $nominative . ' z ' . $n . '. kolena',
96 96
             $genitive . '%s z ' . $n . '. kolena',
97 97
         ];
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
             Relationship::fixed('prastarý otec', '%s prastarého otca')->parent()->parent()->mother(),
148 148
             Relationship::fixed('prastarý otec', '%s prastarého otca')->parent()->parent()->parent(),
149 149
             // Ancestors
150
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastarý otec', '%s prastarého otca'))->ancestor()->male(),
151
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastará matka', '%s prastarej matky'))->ancestor()->female(),
152
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'prastarý rodič', '%s prastarého rodiča'))->ancestor(),
150
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastarý otec', '%s prastarého otca'))->ancestor()->male(),
151
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastará matka', '%s prastarej matky'))->ancestor()->female(),
152
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'prastarý rodič', '%s prastarého rodiča'))->ancestor(),
153 153
             // Grandchildren
154 154
             Relationship::fixed('vnuk', '%s vnuka')->child()->son(),
155 155
             Relationship::fixed('vnučka', '%s vnučky')->child()->daughter(),
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
             Relationship::fixed('pravnučka', '%s pravnučky')->child()->child()->daughter(),
160 160
             Relationship::fixed('pravnúča', '%s pravnúčaťa')->child()->child()->child(),
161 161
             // Descendants
162
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnuk', '%s pravnuka'))->ancestor()->male(),
163
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnučka', '%s pravnučky'))->ancestor()->female(),
164
-            Relationship::dynamic(fn (int $n) => $pra($n - 1, 'pravnúča', '%s pravnúčaťa'))->ancestor(),
162
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnuk', '%s pravnuka'))->ancestor()->male(),
163
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnučka', '%s pravnučky'))->ancestor()->female(),
164
+            Relationship::dynamic(fn(int $n) => $pra($n - 1, 'pravnúča', '%s pravnúčaťa'))->ancestor(),
165 165
             // Aunts and uncles
166 166
             Relationship::fixed('ujo', '%s uja')->mother()->brother(),
167 167
             Relationship::fixed('ujčiná', '%s ujčinej')->mother()->brother()->wife(),
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
             Relationship::fixed('strýko', '%s strýka')->parent()->brother(),
170 170
             Relationship::fixed('teta', '%s tety')->parent()->sister(),
171 171
             // Great-aunts and great-uncles
172
-            Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prastrýko', '%s prastrýka'))->ancestor()->brother(),
173
-            Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prateta', '%s pratety'))->ancestor()->sister(),
172
+            Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prastrýko', '%s prastrýka'))->ancestor()->brother(),
173
+            Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prateta', '%s pratety'))->ancestor()->sister(),
174 174
             // Nieces and nephews
175 175
             Relationship::fixed('synovec', '%s synovca')->sibling()->son(),
176 176
             Relationship::fixed('neter', '%s netere')->sibling()->daughter(),
177 177
             // Great-nieces and great-nephews
178 178
             Relationship::fixed('prasynovec', '%s prasynovca')->sibling()->child()->son(),
179 179
             Relationship::fixed('praneter', '%s pranetere')->sibling()->child()->daughter(),
180
-            Relationship::dynamic(fn (int $n) => $pra($n - 2, 'prasynovec', '%s prasynovca'))->sibling()->descendant()->son(),
181
-            Relationship::dynamic(fn (int $n) => $pra($n - 2, 'praneter', '%s pranetere'))->sibling()->descendant()->daughter(),
180
+            Relationship::dynamic(fn(int $n) => $pra($n - 2, 'prasynovec', '%s prasynovca'))->sibling()->descendant()->son(),
181
+            Relationship::dynamic(fn(int $n) => $pra($n - 2, 'praneter', '%s pranetere'))->sibling()->descendant()->daughter(),
182 182
             // Cousins
183
-            Relationship::dynamic(fn (int $n): array => $cousin($n, static::FEMALE_COUSINS, '', ''))->symmetricCousin()->female(),
184
-            Relationship::dynamic(fn (int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin()->male(),
185
-            Relationship::dynamic(fn (int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin(),
183
+            Relationship::dynamic(fn(int $n): array => $cousin($n, static::FEMALE_COUSINS, '', ''))->symmetricCousin()->female(),
184
+            Relationship::dynamic(fn(int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin()->male(),
185
+            Relationship::dynamic(fn(int $n): array => $cousin($n, static::MALE_COUSINS, '', ''))->symmetricCousin(),
186 186
         ];
187 187
     }
188 188
 }
Please login to merge, or discard this patch.
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.