Passed
Pull Request — main (#5013)
by
unknown
08:06 queued 01:43
created
app/Module/AbstractIndividualListModule.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -258,7 +258,8 @@  discard block
 block discarded – undo
258 258
                     <li class="wt-initials-list-item d-flex">
259 259
                         <?php if ($count > 0) : ?>
260 260
                             <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'show_marnm' => $show_marnm, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->displaySurnameInitial((string) $letter) ?></a>
261
-                        <?php else : ?>
261
+                        <?php else {
262
+    : ?>
262 263
                             <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span>
263 264
 
264 265
                         <?php endif ?>
@@ -312,6 +313,7 @@  discard block
 block discarded – undo
312 313
                 switch ($alpha) {
313 314
                     case '@':
314 315
                         $filter = static fn (string $x): bool => $x === Individual::NOMEN_NESCIO;
316
+}
315 317
                         break;
316 318
                     case ',':
317 319
                         $filter = static fn (string $x): bool => $x === '';
@@ -717,9 +719,10 @@  discard block
 block discarded – undo
717 719
 
718 720
             // The name from the database may be private - check the filtered list...
719 721
             foreach ($individual->getAllNames() as $n => $name) {
720
-                if ($name['givn'] === $row->n_givn && $name['surn'] === $row->n_surn)
721
-                    if ($galpha === '' || I18N::language()->initialLetter(I18N::language()->normalize(I18N::strtoupper($row->n_givn))) === $galpha) {
722
+                if ($name['givn'] === $row->n_givn && $name['surn'] === $row->n_surn) {
723
+                                    if ($galpha === '' || I18N::language()->initialLetter(I18N::language()->normalize(I18N::strtoupper($row->n_givn))) === $galpha) {
722 724
                         $individual->setPrimaryName($n);
725
+                }
723 726
                         // We need to clone $individual, as we may have multiple references to the
724 727
                         // same individual in this list, and the "primary name" would otherwise
725 728
                         // be shared amongst all of them.
Please login to merge, or discard this patch.