Passed
Pull Request — main (#3887)
by Rico
06:03
created
app/Http/RequestHandlers/AddChildToIndividualPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
                 break;
79 79
         }
80 80
 
81
-        $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
81
+        $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
82 82
 
83 83
         $facts = [
84 84
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddParentToIndividualPage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@
 block discarded – undo
62 62
         $individual = Auth::checkIndividualAccess($individual, true);
63 63
 
64 64
         // Create a dummy individual, so that we can create new/empty facts.
65
-        $dummy   = Registry::individualFactory()->new('', '0 @@ INDI', null, $tree);
65
+        $dummy = Registry::individualFactory()->new('', '0 @@ INDI', null, $tree);
66 66
 
67 67
         // Default names facts.
68 68
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
69 69
         $names             = $surname_tradition->newParentNames($individual, $sex);
70
-        $name_facts        = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
70
+        $name_facts        = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
71 71
 
72
-        $facts   = [
72
+        $facts = [
73 73
             'i' => [
74 74
                 new Fact('1 SEX ' . $sex, $dummy, ''),
75 75
                 ...$name_facts,
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
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         // Default names facts.
68 68
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
69 69
         $names             = $surname_tradition->newChildNames($family->husband(), $family->wife(), $sex);
70
-        $name_facts        = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
70
+        $name_facts        = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummy, ''), $names);
71 71
 
72 72
         $facts = [
73 73
             'i' => [
Please login to merge, or discard this patch.
app/Http/RequestHandlers/AddSpouseToIndividualPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,9 +72,9 @@
 block discarded – undo
72 72
         // Default names facts.
73 73
         $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION'));
74 74
         $names             = $surname_tradition->newSpouseNames($individual, $sex);
75
-        $name_facts        = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
75
+        $name_facts        = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
76 76
 
77
-        $facts   = [
77
+        $facts = [
78 78
             'i' => [
79 79
                 new Fact('1 SEX ' . $sex, $dummyi, ''),
80 80
                 ...$name_facts,
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
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $spouse            = $family->spouses()->first();
73 73
         assert($spouse instanceof Individual);
74 74
         $names      = $surname_tradition->newSpouseNames($spouse, $sex);
75
-        $name_facts = array_map(fn (string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
75
+        $name_facts = array_map(fn(string $gedcom): Fact => new Fact($gedcom, $dummyi, ''), $names);
76 76
 
77 77
         $facts = [
78 78
             'i' => [
Please login to merge, or discard this patch.
app/SurnameTradition/DefaultSurnameTradition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $parts = array_filter($parts);
125 125
 
126 126
         $parts = array_map(
127
-            fn (string $tag, string $value): string => "\n2 " . $tag . ' ' . $value,
127
+            fn(string $tag, string $value): string => "\n2 " . $tag . ' ' . $value,
128 128
             array_keys($parts),
129 129
             $parts
130 130
         );
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         if ($individual instanceof Individual) {
149 149
             $fact = $individual
150 150
                 ->facts(['NAME'])
151
-                ->first(fn (Fact $fact): bool => in_array($fact->attribute('TYPE'), ['', 'birth', 'change'], true));
151
+                ->first(fn(Fact $fact): bool => in_array($fact->attribute('TYPE'), ['', 'birth', 'change'], true));
152 152
 
153 153
             if ($fact instanceof Fact) {
154 154
                 return $fact->value();
Please login to merge, or discard this patch.
app/Http/RequestHandlers/EditFactPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $record = Auth::checkRecordAccess($record, true);
75 75
 
76 76
         // Find the fact to edit
77
-        $fact = $record->facts()->first(fn (Fact $fact): bool => $fact->id() === $fact_id && $fact->canEdit());
77
+        $fact = $record->facts()->first(fn(Fact $fact): bool => $fact->id() === $fact_id && $fact->canEdit());
78 78
 
79 79
         if ($fact === null) {
80 80
             return redirect($record->url());
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             ]);
99 99
         }
100 100
 
101
-        $title  = $record->fullName() . ' - ' . $fact->label();
101
+        $title = $record->fullName() . ' - ' . $fact->label();
102 102
 
103 103
         return $this->viewResponse('edit/edit-fact', [
104 104
             'can_edit_raw' => $can_edit_raw,
Please login to merge, or discard this patch.
app/Services/GedcomEditService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
         $subtags = Registry::elementFactory()->make($record->tag())->subtags();
567 567
 
568 568
         if (!$include_hidden) {
569
-            $fn_hidden = fn (string $t): bool => !$this->isHiddenTag($record->tag() . ':' . $t);
569
+            $fn_hidden = fn(string $t): bool => !$this->isHiddenTag($record->tag() . ':' . $t);
570 570
             $subtags   = array_filter($subtags, $fn_hidden);
571 571
         }
572 572
 
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
     private function isHiddenTag(string $tag): bool
658 658
     {
659 659
         // Function to filter hidden tags.
660
-        $fn_hide = fn (string $x): bool => (bool) Site::getPreference('HIDE_' . $x);
660
+        $fn_hide = fn(string $x): bool => (bool) Site::getPreference('HIDE_' . $x);
661 661
 
662 662
         $preferences = array_filter(Gedcom::HIDDEN_TAGS, $fn_hide, ARRAY_FILTER_USE_KEY);
663 663
         $preferences = array_values($preferences);
Please login to merge, or discard this patch.
app/Functions/FunctionsPrint.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     if ($note->canShow()) {
171 171
                         $noterec = $note->gedcom();
172 172
                         $nt      = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
173
-                        $data    .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
173
+                        $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
174 174
                     }
175 175
                 } else {
176 176
                     $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>';
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                 if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) {
388 388
                     foreach ($matches[1] as $match) {
389 389
                         $wt_place = new Place($match, $tree);
390
-                        $html     .= ' - ' . $wt_place->fullName();
390
+                        $html .= ' - ' . $wt_place->fullName();
391 391
                     }
392 392
                 }
393 393
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                     // Links to external maps
402 402
                     $html .= app(ModuleService::class)
403 403
                         ->findByInterface(ModuleMapLinkInterface::class)
404
-                        ->map(fn (ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event))
404
+                        ->map(fn(ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($event))
405 405
                         ->implode('');
406 406
                 }
407 407
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
         }
483 483
 
484 484
         // Create a label for a subtag
485
-        $fn = fn ($subtag) => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label();
485
+        $fn = fn($subtag) => Registry::elementFactory()->make($record->tag() . ':' . $subtag)->label();
486 486
 
487 487
         $addfacts   = array_merge(self::checkFactUnique($uniquefacts, $record->facts()), $addfacts);
488 488
         $quickfacts = array_intersect($quickfacts, $addfacts);
Please login to merge, or discard this patch.