@@ -174,7 +174,7 @@ |
||
| 174 | 174 | ]); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - public function record(GedcomRecord|null $record): string |
|
| 177 | + public function record(GedcomRecord | null $record): string |
|
| 178 | 178 | { |
| 179 | 179 | if ($record === null) { |
| 180 | 180 | return $this->missing(); |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | * @param array<int|string> $z_axis |
| 847 | 847 | * @param array<array<int>> $ydata |
| 848 | 848 | */ |
| 849 | - private function fillYData(int|string $x, int|string $z, int $value, array $x_axis, array $z_axis, array &$ydata): void |
|
| 849 | + private function fillYData(int | string $x, int | string $z, int $value, array $x_axis, array $z_axis, array &$ydata): void |
|
| 850 | 850 | { |
| 851 | 851 | $x = $this->findAxisEntry($x, $x_axis); |
| 852 | 852 | $z = $this->findAxisEntry($z, $z_axis); |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | * |
| 863 | 863 | * @param array<int|string > $axis |
| 864 | 864 | */ |
| 865 | - private function findAxisEntry(int|string $value, array $axis): int|string |
|
| 865 | + private function findAxisEntry(int | string $value, array $axis): int | string |
|
| 866 | 866 | { |
| 867 | 867 | if (is_numeric($value)) { |
| 868 | 868 | $value = (int) $value; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $rows = $query |
| 102 | 102 | ->groupBy(['n_givn']) |
| 103 | 103 | ->pluck(new Expression('COUNT(DISTINCT n_id)'), 'n_givn') |
| 104 | - ->map(static fn (int|string $count): int => (int) $count); |
|
| 104 | + ->map(static fn (int | string $count): int => (int) $count); |
|
| 105 | 105 | |
| 106 | 106 | |
| 107 | 107 | $given_names = []; |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | * |
| 785 | 785 | * @return object{id:string,year:int,fact:string,type:string}|null |
| 786 | 786 | */ |
| 787 | - private function firstEvent(array $events, bool $ascending): object|null |
|
| 787 | + private function firstEvent(array $events, bool $ascending): object | null |
|
| 788 | 788 | { |
| 789 | 789 | if ($events === []) { |
| 790 | 790 | $events = [ |
@@ -803,7 +803,7 @@ discard block |
||
| 803 | 803 | ->orderBy('d_julianday1', $ascending ? 'ASC' : 'DESC') |
| 804 | 804 | ->limit(1) |
| 805 | 805 | ->get() |
| 806 | - ->map(static fn (object $row): object => (object) [ |
|
| 806 | + ->map(static fn (object $row) : object => (object) [ |
|
| 807 | 807 | 'id' => $row->id, |
| 808 | 808 | 'year' => (int) $row->year, |
| 809 | 809 | 'fact' => $row->fact, |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | /** |
| 1136 | 1136 | * @return object{individual:Individual,days:int}|null |
| 1137 | 1137 | */ |
| 1138 | - public function longlifeQuery(string $sex): object|null |
|
| 1138 | + public function longlifeQuery(string $sex): object | null |
|
| 1139 | 1139 | { |
| 1140 | 1140 | return $this->birthAndDeathQuery($sex) |
| 1141 | 1141 | ->orderBy('days', 'desc') |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | public function commonGiven(string $threshold = '1', string $limit = '10'): string |
| 514 | 514 | { |
| 515 | 515 | return $this->data->commonGivenNames('ALL', (int) $threshold, (int) $limit) |
| 516 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 516 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 517 | 517 | $key => '<bdi>' . e($key) . '</bdi>', |
| 518 | 518 | ]) |
| 519 | 519 | ->implode(I18N::$list_separator); |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | public function commonGivenFemale(string $threshold = '1', string $limit = '10'): string |
| 523 | 523 | { |
| 524 | 524 | return $this->data->commonGivenNames('F', (int) $threshold, (int) $limit) |
| 525 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 525 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 526 | 526 | $key => '<bdi>' . e($key) . '</bdi>', |
| 527 | 527 | ]) |
| 528 | 528 | ->implode(I18N::$list_separator); |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | public function commonGivenFemaleTotals(string $threshold = '1', string $limit = '10'): string |
| 556 | 556 | { |
| 557 | 557 | return $this->data->commonGivenNames('F', (int) $threshold, (int) $limit) |
| 558 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 558 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 559 | 559 | $key => '<bdi>' . e($key) . '</bdi> (' . I18N::number($value) . ')', |
| 560 | 560 | ]) |
| 561 | 561 | ->implode(I18N::$list_separator); |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | public function commonGivenMale(string $threshold = '1', string $limit = '10'): string |
| 581 | 581 | { |
| 582 | 582 | return $this->data->commonGivenNames('M', (int) $threshold, (int) $limit) |
| 583 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 583 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 584 | 584 | $key => '<bdi>' . e($key) . '</bdi>', |
| 585 | 585 | ]) |
| 586 | 586 | ->implode(I18N::$list_separator); |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | public function commonGivenMaleTotals(string $threshold = '1', string $limit = '10'): string |
| 614 | 614 | { |
| 615 | 615 | return $this->data->commonGivenNames('M', (int) $threshold, (int) $limit) |
| 616 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 616 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 617 | 617 | $key => '<bdi>' . e($key) . '</bdi> (' . I18N::number($value) . ')', |
| 618 | 618 | ]) |
| 619 | 619 | ->implode(I18N::$list_separator); |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | public function commonGivenOther(string $threshold = '1', string $limit = '10'): string |
| 623 | 623 | { |
| 624 | 624 | return $this->data->commonGivenNames('X', (int) $threshold, (int) $limit) |
| 625 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 625 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 626 | 626 | $key => '<bdi>' . e($key) . '</bdi>', |
| 627 | 627 | ]) |
| 628 | 628 | ->implode(I18N::$list_separator); |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | public function commonGivenOtherTotals(string $threshold = '1', string $limit = '10'): string |
| 656 | 656 | { |
| 657 | 657 | return $this->data->commonGivenNames('X', (int) $threshold, (int) $limit) |
| 658 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 658 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 659 | 659 | $key => '<bdi>' . e($key) . '</bdi> (' . I18N::number($value) . ')', |
| 660 | 660 | ]) |
| 661 | 661 | ->implode(I18N::$list_separator); |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | public function commonGivenTotals(string $threshold = '1', string $limit = '10'): string |
| 673 | 673 | { |
| 674 | 674 | return $this->data->commonGivenNames('ALL', (int) $threshold, (int) $limit) |
| 675 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 675 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 676 | 676 | $key => '<bdi>' . e($key) . '</bdi> (' . I18N::number($value) . ')', |
| 677 | 677 | ]) |
| 678 | 678 | ->implode(I18N::$list_separator); |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | public function commonGivenUnknown(string $threshold = '1', string $limit = '10'): string |
| 682 | 682 | { |
| 683 | 683 | return $this->data->commonGivenNames('U', (int) $threshold, (int) $limit) |
| 684 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 684 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 685 | 685 | $key => '<bdi>' . e($key) . '</bdi>', |
| 686 | 686 | ]) |
| 687 | 687 | ->implode(I18N::$list_separator); |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | public function commonGivenUnknownTotals(string $threshold = '1', string $limit = '10'): string |
| 715 | 715 | { |
| 716 | 716 | return $this->data->commonGivenNames('U', (int) $threshold, (int) $limit) |
| 717 | - ->mapWithKeys(static fn (int $value, int|string $key): array => [ |
|
| 717 | + ->mapWithKeys(static fn (int $value, int | string $key): array => [ |
|
| 718 | 718 | $key => '<bdi>' . e($key) . '</bdi> (' . I18N::number($value) . ')', |
| 719 | 719 | ]) |
| 720 | 720 | ->implode(I18N::$list_separator); |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | return (string) $user->id(); |
| 1216 | 1216 | } |
| 1217 | 1217 | |
| 1218 | - public function latestUserLoggedin(string|null $yes = null, string|null $no = null): string |
|
| 1218 | + public function latestUserLoggedin(string | null $yes = null, string | null $no = null): string |
|
| 1219 | 1219 | { |
| 1220 | 1220 | if ($this->data->isUserLoggedIn($this->data->latestUserId())) { |
| 1221 | 1221 | return $yes ?? I18N::translate('Yes'); |
@@ -1231,9 +1231,9 @@ discard block |
||
| 1231 | 1231 | return e($user->userName()); |
| 1232 | 1232 | } |
| 1233 | 1233 | |
| 1234 | - public function latestUserRegDate(string|null $format = null): string |
|
| 1234 | + public function latestUserRegDate(string | null $format = null): string |
|
| 1235 | 1235 | { |
| 1236 | - $format ??= I18N::dateFormat(); |
|
| 1236 | + $format ??= I18N::dateFormat(); |
|
| 1237 | 1237 | $user = $this->user_service->find($this->data->latestUserId()) ?? Auth::user(); |
| 1238 | 1238 | $timestamp = (int) $user->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED); |
| 1239 | 1239 | |
@@ -1244,9 +1244,9 @@ discard block |
||
| 1244 | 1244 | return Registry::timestampFactory()->make($timestamp)->format(strtr($format, ['%' => ''])); |
| 1245 | 1245 | } |
| 1246 | 1246 | |
| 1247 | - public function latestUserRegTime(string|null $format = null): string |
|
| 1247 | + public function latestUserRegTime(string | null $format = null): string |
|
| 1248 | 1248 | { |
| 1249 | - $format ??= I18N::timeFormat(); |
|
| 1249 | + $format ??= I18N::timeFormat(); |
|
| 1250 | 1250 | $user = $this->user_service->find($this->data->latestUserId()) ?? Auth::user(); |
| 1251 | 1251 | $timestamp = (int) $user->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED); |
| 1252 | 1252 | |