@@ -114,7 +114,7 @@ |
||
| 114 | 114 | * |
| 115 | 115 | * @return ResponseInterface |
| 116 | 116 | */ |
| 117 | -function response(array|object|string $content = '', int $code = StatusCodeInterface::STATUS_OK, array $headers = []): ResponseInterface |
|
| 117 | +function response(array | object | string $content = '', int $code = StatusCodeInterface::STATUS_OK, array $headers = []): ResponseInterface |
|
| 118 | 118 | { |
| 119 | 119 | return Registry::responseFactory()->response($content, $code, $headers); |
| 120 | 120 | } |
@@ -301,7 +301,7 @@ |
||
| 301 | 301 | { |
| 302 | 302 | $latest_version = $this->fetchLatestVersion(false); |
| 303 | 303 | |
| 304 | - [, , $url] = explode('|', $latest_version . '||'); |
|
| 304 | + [,, $url] = explode('|', $latest_version . '||'); |
|
| 305 | 305 | |
| 306 | 306 | return $url; |
| 307 | 307 | } |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | ->orderBy('d_type') |
| 233 | 233 | ->limit(1) |
| 234 | 234 | ->get() |
| 235 | - ->map(static fn (object $row): object => (object) [ |
|
| 235 | + ->map(static fn (object $row) : object => (object) [ |
|
| 236 | 236 | 'id' => $row->id, |
| 237 | 237 | 'year' => (int) $row->year, |
| 238 | 238 | 'fact' => $row->fact, |
@@ -1070,7 +1070,7 @@ |
||
| 1070 | 1070 | * @param Expression|string $column |
| 1071 | 1071 | * @param array<string> $search_terms |
| 1072 | 1072 | */ |
| 1073 | - private function whereSearch(Builder $query, Expression|string $column, array $search_terms): void |
|
| 1073 | + private function whereSearch(Builder $query, Expression | string $column, array $search_terms): void |
|
| 1074 | 1074 | { |
| 1075 | 1075 | foreach ($search_terms as $search_term) { |
| 1076 | 1076 | $query->where($column, $this->iLike(), '%' . addcslashes($search_term, '\\%_') . '%'); |
@@ -290,7 +290,8 @@ discard block |
||
| 290 | 290 | <li class="wt-initials-list-item d-flex"> |
| 291 | 291 | <?php if ($count > 0) : ?> |
| 292 | 292 | <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> |
| 293 | - <?php else : ?> |
|
| 293 | + <?php else { |
|
| 294 | + : ?> |
|
| 294 | 295 | <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span> |
| 295 | 296 | |
| 296 | 297 | <?php endif ?> |
@@ -345,6 +346,7 @@ discard block |
||
| 345 | 346 | switch ($alpha) { |
| 346 | 347 | case '@': |
| 347 | 348 | $filter = static fn(string $x): bool => $x === Individual::NOMEN_NESCIO; |
| 349 | +} |
|
| 348 | 350 | break; |
| 349 | 351 | case ',': |
| 350 | 352 | $filter = static fn(string $x): bool => $x === ''; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $surname_initials = $this->surnameInitials($surname_data); |
| 217 | 217 | |
| 218 | 218 | // We've requested a surname that doesn't currently exist. |
| 219 | - if ($surname !== '' && !array_key_exists($surname, $all_surns)) { |
|
| 219 | + if ($surname !== '' && !array_key_exists($surname, $all_surns)) { |
|
| 220 | 220 | $message = I18N::translate('There are no individuals with the surname “%s”', e($surname)); |
| 221 | 221 | FlashMessages::addMessage($message); |
| 222 | 222 | |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | ->groupBy([$this->binaryColumn('n_givn')]); |
| 605 | 605 | |
| 606 | 606 | foreach ($query->get() as $row) { |
| 607 | - $initial = I18N::strtoupper(I18N::language()->initialLetter($row->n_givn)); |
|
| 607 | + $initial = I18N::strtoupper(I18N::language()->initialLetter($row->n_givn)); |
|
| 608 | 608 | $initials[$initial] ??= 0; |
| 609 | 609 | $initials[$initial] += (int) $row->count; |
| 610 | 610 | } |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | * |
| 833 | 833 | * @return Expression |
| 834 | 834 | */ |
| 835 | - private function binaryColumn(string $column, string|null $alias = null): Expression |
|
| 835 | + private function binaryColumn(string $column, string | null $alias = null): Expression |
|
| 836 | 836 | { |
| 837 | 837 | if (DB::connection()->getDriverName() === 'mysql') { |
| 838 | 838 | $sql = 'CAST(' . $column . ' AS binary)'; |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | |
| 115 | 115 | // Only update session once a minute to reduce contention on the session table. |
| 116 | 116 | if ($now->subtractMinutes(1)->timestamp() > Registry::timestampFactory()->fromString($this->row->session_time)->timestamp()) { |
| 117 | - $updates['session_time'] = $now->toDateTimeString(); |
|
| 117 | + $updates['session_time'] = $now->toDateTimeString(); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | if ($updates !== []) { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Note|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Note |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Note |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return Note |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Note |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Note |
|
| 87 | 87 | { |
| 88 | 88 | return new Note($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Header|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Header |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Header |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return Header |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Header |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Header |
|
| 87 | 87 | { |
| 88 | 88 | return new Header($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return SharedNote|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?SharedNote |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?SharedNote |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return SharedNote |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): SharedNote |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : SharedNote |
|
| 87 | 87 | { |
| 88 | 88 | return new SharedNote($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |