Passed
Pull Request — main (#4152)
by Rico
16:17
created
app/Statistics/Google/ChartSex.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
         string $color_male = null,
47 47
         string $color_unknown = null
48 48
     ): string {
49
-        $color_female  = $color_female  ?? '#ffd1dc';
50
-        $color_male    = $color_male    ?? '#84beff';
49
+        $color_female  = $color_female ?? '#ffd1dc';
50
+        $color_male    = $color_male ?? '#84beff';
51 51
         $color_unknown = $color_unknown ?? '#777777';
52 52
 
53 53
         $data = [
Please login to merge, or discard this patch.
app/Statistics/Repository/FamilyDatesRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             ->select(['d_gid as id', 'd_year as year', 'd_fact AS fact', 'd_type AS type'])
80 80
             ->where('d_file', '=', $this->tree->id())
81 81
             ->where('d_fact', '=', $fact)
82
-            ->where('d_julianday1', '=', function (Builder $query) use ($operation, $fact): void {
82
+            ->where('d_julianday1', '=', function (Builder $query) use ($operation, $fact) : void {
83 83
                 $query->selectRaw($operation . '(d_julianday1)')
84 84
                     ->from('dates')
85 85
                     ->where('d_file', '=', $this->tree->id())
Please login to merge, or discard this patch.
app/Module/IndividualListModule.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -326,7 +326,8 @@  discard block
 block discarded – undo
326 326
                     <li class="wt-initials-list-item d-flex">
327 327
                         <?php if ($count > 0) : ?>
328 328
                             <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->surnameInitial((string) $letter) ?></a>
329
-                        <?php else : ?>
329
+                        <?php else {
330
+    : ?>
330 331
                             <span class="wt-initial px-1 text-muted"><?= $this->surnameInitial((string) $letter) ?></span>
331 332
 
332 333
                         <?php endif ?>
@@ -380,6 +381,7 @@  discard block
 block discarded – undo
380 381
 
381 382
             if ($show === 'indi' || $show === 'surn') {
382 383
                 $surns = $this->surnames($tree, $surname, $alpha, $show_marnm === 'yes', $families, I18N::locale());
384
+}
383 385
                 if ($show === 'surn') {
384 386
                     // Show the surname list
385 387
                     switch ($tree->getPreference('SURNAME_LIST_STYLE')) {
Please login to merge, or discard this patch.
app/Http/RequestHandlers/PendingChangesLogData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 '<div class="gedcom-data" dir="ltr">' .
113 113
                 preg_replace_callback(
114 114
                     '/@(' . Gedcom::REGEX_XREF . ')@/',
115
-                    static function (array $match) use ($tree): string {
115
+                    static function (array $match) use ($tree) : string {
116 116
                         $record = Registry::gedcomRecordFactory()->make($match[1], $tree);
117 117
 
118 118
                         return $record ? '<a href="' . e($record->url()) . '">' . $match[0] . '</a>' : $match[0];
Please login to merge, or discard this patch.
app/Services/UserService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function find(?int $user_id): ?User
54 54
     {
55
-        return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id): ?User {
55
+        return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id) : ?User {
56 56
             return DB::table('user')
57 57
                 ->where('user_id', '=', $user_id)
58 58
                 ->get()
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
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 
331 331
             $language = app(ModuleService::class)
332 332
                 ->findByInterface(ModuleLanguageInterface::class, true)
333
-                ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
333
+                ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
334 334
 
335 335
 
336 336
 
Please login to merge, or discard this patch.
app/Services/RelationshipService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     {
77 77
         $language = app(ModuleService::class)
78 78
             ->findByInterface(ModuleLanguageInterface::class, true)
79
-            ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
79
+            ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag());
80 80
 
81 81
         $path = $this->getCloseRelationship($individual1, $individual2);
82 82
 
Please login to merge, or discard this patch.
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(false, null, false),
120 120
             ]);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $record = Auth::checkRecordAccess($record);
150 150
 
151 151
         $fact = $record->facts()
152
-            ->filter(fn (Fact $fact): bool => $fact->id() === $fact_id)
152
+            ->filter(fn(Fact $fact): bool => $fact->id() === $fact_id)
153 153
             ->first();
154 154
 
155 155
         if ($fact instanceof Fact) {
Please login to merge, or discard this patch.
app/Module/IndividualFactsTabModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,17 +120,17 @@
 block discarded – undo
120 120
         // Which facts and events are handled by other modules?
121 121
         $sidebar_facts = $this->module_service
122 122
             ->findByComponent(ModuleSidebarInterface::class, $individual->tree(), Auth::user())
123
-            ->map(fn (ModuleSidebarInterface $sidebar): Collection => $sidebar->supportedFacts());
123
+            ->map(fn(ModuleSidebarInterface $sidebar): Collection => $sidebar->supportedFacts());
124 124
 
125 125
         $tab_facts = $this->module_service
126 126
             ->findByComponent(ModuleTabInterface::class, $individual->tree(), Auth::user())
127
-            ->map(fn (ModuleTabInterface $tab): Collection => $tab->supportedFacts());
127
+            ->map(fn(ModuleTabInterface $tab): Collection => $tab->supportedFacts());
128 128
 
129 129
         $exclude_facts = $sidebar_facts->merge($tab_facts)->flatten();
130 130
 
131 131
         // The individual’s own facts
132 132
         $individual_facts = $individual->facts()
133
-            ->filter(fn (Fact $fact): bool => !$exclude_facts->contains($fact->tag()));
133
+            ->filter(fn(Fact $fact): bool => !$exclude_facts->contains($fact->tag()));
134 134
 
135 135
         $relative_facts = new Collection();
136 136
 
Please login to merge, or discard this patch.