@@ -251,8 +251,8 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | public function chartIndisWithSources( |
| 254 | - string|null $color_from = null, |
|
| 255 | - string|null $color_to = null |
|
| 254 | + string | null $color_from = null, |
|
| 255 | + string | null $color_to = null |
|
| 256 | 256 | ): string { |
| 257 | 257 | return $this->individual_repository->chartIndisWithSources($color_from, $color_to); |
| 258 | 258 | } |
@@ -283,8 +283,8 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | public function chartFamsWithSources( |
| 286 | - string|null $color_from = null, |
|
| 287 | - string|null $color_to = null |
|
| 286 | + string | null $color_from = null, |
|
| 287 | + string | null $color_to = null |
|
| 288 | 288 | ): string { |
| 289 | 289 | return $this->individual_repository->chartFamsWithSources($color_from, $color_to); |
| 290 | 290 | } |
@@ -419,9 +419,9 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | public function chartSex( |
| 422 | - string|null $color_female = null, |
|
| 423 | - string|null $color_male = null, |
|
| 424 | - string|null $color_unknown = null |
|
| 422 | + string | null $color_female = null, |
|
| 423 | + string | null $color_male = null, |
|
| 424 | + string | null $color_unknown = null |
|
| 425 | 425 | ): string { |
| 426 | 426 | return $this->individual_repository->chartSex($color_female, $color_male, $color_unknown); |
| 427 | 427 | } |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | return $this->individual_repository->totalDeceasedPercentage(); |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | - public function chartMortality(string|null $color_living = null, string|null $color_dead = null): string |
|
| 449 | + public function chartMortality(string | null $color_living = null, string | null $color_dead = null): string |
|
| 450 | 450 | { |
| 451 | 451 | return $this->individual_repository->chartMortality($color_living, $color_dead); |
| 452 | 452 | } |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | return $this->media_repository->totalMediaUnknown(); |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | - public function chartMedia(string|null $color_from = null, string|null $color_to = null): string |
|
| 554 | + public function chartMedia(string | null $color_from = null, string | null $color_to = null): string |
|
| 555 | 555 | { |
| 556 | 556 | return $this->media_repository->chartMedia($color_from, $color_to); |
| 557 | 557 | } |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | return $this->individual_repository->statsBirthBySexQuery($year1, $year2); |
| 640 | 640 | } |
| 641 | 641 | |
| 642 | - public function statsBirth(string|null $color_from = null, string|null $color_to = null): string |
|
| 642 | + public function statsBirth(string | null $color_from = null, string | null $color_to = null): string |
|
| 643 | 643 | { |
| 644 | 644 | return $this->individual_repository->statsBirth($color_from, $color_to); |
| 645 | 645 | } |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | return $this->individual_repository->statsDeathBySexQuery($year1, $year2); |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | - public function statsDeath(string|null $color_from = null, string|null $color_to = null): string |
|
| 697 | + public function statsDeath(string | null $color_from = null, string | null $color_to = null): string |
|
| 698 | 698 | { |
| 699 | 699 | return $this->individual_repository->statsDeath($color_from, $color_to); |
| 700 | 700 | } |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | return $this->family_repository->statsFirstMarriageQuery($year1, $year2); |
| 935 | 935 | } |
| 936 | 936 | |
| 937 | - public function statsMarr(string|null $color_from = null, string|null $color_to = null): string |
|
| 937 | + public function statsMarr(string | null $color_from = null, string | null $color_to = null): string |
|
| 938 | 938 | { |
| 939 | 939 | return $this->family_repository->statsMarr($color_from, $color_to); |
| 940 | 940 | } |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | return $this->family_dates_repository->lastDivorcePlace(); |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | - public function statsDiv(string|null $color_from = null, string|null $color_to = null): string |
|
| 982 | + public function statsDiv(string | null $color_from = null, string | null $color_to = null): string |
|
| 983 | 983 | { |
| 984 | 984 | return $this->family_repository->statsDiv($color_from, $color_to); |
| 985 | 985 | } |
@@ -1223,8 +1223,8 @@ discard block |
||
| 1223 | 1223 | } |
| 1224 | 1224 | |
| 1225 | 1225 | public function chartLargestFamilies( |
| 1226 | - string|null $color_from = null, |
|
| 1227 | - string|null $color_to = null, |
|
| 1226 | + string | null $color_from = null, |
|
| 1227 | + string | null $color_to = null, |
|
| 1228 | 1228 | string $total = '10' |
| 1229 | 1229 | ): string { |
| 1230 | 1230 | return $this->family_repository->chartLargestFamilies($color_from, $color_to, (int) $total); |
@@ -1339,8 +1339,8 @@ discard block |
||
| 1339 | 1339 | } |
| 1340 | 1340 | |
| 1341 | 1341 | public function chartCommonSurnames( |
| 1342 | - string|null $color_from = null, |
|
| 1343 | - string|null $color_to = null, |
|
| 1342 | + string | null $color_from = null, |
|
| 1343 | + string | null $color_to = null, |
|
| 1344 | 1344 | string $number_of_surnames = '10' |
| 1345 | 1345 | ): string { |
| 1346 | 1346 | return $this->individual_repository |
@@ -1448,8 +1448,8 @@ discard block |
||
| 1448 | 1448 | } |
| 1449 | 1449 | |
| 1450 | 1450 | public function chartCommonGiven( |
| 1451 | - string|null $color_from = null, |
|
| 1452 | - string|null $color_to = null, |
|
| 1451 | + string | null $color_from = null, |
|
| 1452 | + string | null $color_to = null, |
|
| 1453 | 1453 | string $maxtoshow = '7' |
| 1454 | 1454 | ): string { |
| 1455 | 1455 | return $this->individual_repository->chartCommonGiven($color_from, $color_to, (int) $maxtoshow); |
@@ -1525,17 +1525,17 @@ discard block |
||
| 1525 | 1525 | return $this->latest_user_repository->latestUserFullName(); |
| 1526 | 1526 | } |
| 1527 | 1527 | |
| 1528 | - public function latestUserRegDate(string|null $format = null): string |
|
| 1528 | + public function latestUserRegDate(string | null $format = null): string |
|
| 1529 | 1529 | { |
| 1530 | 1530 | return $this->latest_user_repository->latestUserRegDate($format); |
| 1531 | 1531 | } |
| 1532 | 1532 | |
| 1533 | - public function latestUserRegTime(string|null $format = null): string |
|
| 1533 | + public function latestUserRegTime(string | null $format = null): string |
|
| 1534 | 1534 | { |
| 1535 | 1535 | return $this->latest_user_repository->latestUserRegTime($format); |
| 1536 | 1536 | } |
| 1537 | 1537 | |
| 1538 | - public function latestUserLoggedin(string|null $yes = null, string|null $no = null): string |
|
| 1538 | + public function latestUserLoggedin(string | null $yes = null, string | null $no = null): string |
|
| 1539 | 1539 | { |
| 1540 | 1540 | return $this->latest_user_repository->latestUserLoggedin($yes, $no); |
| 1541 | 1541 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | class SlugFactory implements SlugFactoryInterface |
| 36 | 36 | { |
| 37 | - private Transliterator|null $transliterator = null; |
|
| 37 | + private Transliterator | null $transliterator = null; |
|
| 38 | 38 | |
| 39 | 39 | public function __construct(private PhpService $php_service) |
| 40 | 40 | { |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | return $response; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - protected function compressionMethod(RequestInterface $request): string|null |
|
| 97 | + protected function compressionMethod(RequestInterface $request): string | null |
|
| 98 | 98 | { |
| 99 | 99 | $accept_encoding = strtolower($request->getHeaderLine('accept-encoding')); |
| 100 | 100 | $zlib_available = $this->php_service->extensionLoaded(extension: 'zlib'); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | public function __construct( |
| 39 | 39 | private PhpService $php_service, |
| 40 | - float|null $start_time = null, |
|
| 40 | + float | null $start_time = null, |
|
| 41 | 41 | ) { |
| 42 | 42 | $this->start_time = $start_time ?? Registry::timeFactory()->now(); |
| 43 | 43 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | /** |
| 165 | 165 | * @param list<int> $parent_place_ids |
| 166 | 166 | */ |
| 167 | - public function deleteUnusedLocations(int|null $parent_location_id, array $parent_place_ids): void |
|
| 167 | + public function deleteUnusedLocations(int | null $parent_location_id, array $parent_place_ids): void |
|
| 168 | 168 | { |
| 169 | 169 | if ($parent_location_id === null) { |
| 170 | 170 | $location_query = DB::table('place_location') |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | * |
| 200 | 200 | * @return Collection<int,object{id:int,key:string,place:string,latitude:float|null,longitude:float|null,child_count:int,no_coord:int}> |
| 201 | 201 | */ |
| 202 | - public function getPlaceListLocation(int|null $parent_id): Collection |
|
| 202 | + public function getPlaceListLocation(int | null $parent_id): Collection |
|
| 203 | 203 | { |
| 204 | 204 | $prefix = DB::prefix(); |
| 205 | 205 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | 'child_count' => (int) $row->child_count, |
| 251 | 251 | 'no_coord' => (int) $row->no_coord, |
| 252 | 252 | ]) |
| 253 | - ->sort(static fn (object $x, object $y): int => I18N::comparator()($x->place, $y->place)); |
|
| 253 | + ->sort(static fn (object $x, object $y) : int => I18N::comparator()($x->place, $y->place)); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | public function writeLatitude(float $latitude): string |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | return implode(separator: ',', array: $columns); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - private function quoteCsvValue(string|int $value): string |
|
| 115 | + private function quoteCsvValue(string | int $value): string |
|
| 116 | 116 | { |
| 117 | 117 | return '"' . addcslashes(string: (string) $value, characters: '"') . '"'; |
| 118 | 118 | } |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | 'real_name' => $user->realName(), |
| 72 | 72 | 'email' => $user->email(), |
| 73 | 73 | 'admin' => $user->getPreference(setting_name: UserInterface::PREF_IS_ADMINISTRATOR) ? 'yes' : 'no', |
| 74 | - 'approved' => $user->getPreference(setting_name: UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'yes' : 'no', |
|
| 75 | - 'verified' => $user->getPreference(setting_name: UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'yes' : 'no', |
|
| 76 | - 'language' => $user->getPreference(setting_name: UserInterface::PREF_LANGUAGE), |
|
| 77 | - 'timezone' => $user->getPreference(setting_name: UserInterface::PREF_TIME_ZONE), |
|
| 78 | - 'contact' => $user->getPreference(setting_name: UserInterface::PREF_CONTACT_METHOD), |
|
| 79 | - 'registered' => $this->formatTimestamp(timestamp: (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_REGISTERED)), |
|
| 80 | - 'last_login' => $this->formatTimestamp(timestamp: (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_ACTIVE)), |
|
| 74 | + 'approved' => $user->getPreference(setting_name : UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'yes' : 'no', |
|
| 75 | + 'verified' => $user->getPreference(setting_name : UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'yes' : 'no', |
|
| 76 | + 'language' => $user->getPreference(setting_name : UserInterface::PREF_LANGUAGE), |
|
| 77 | + 'timezone' => $user->getPreference(setting_name : UserInterface::PREF_TIME_ZONE), |
|
| 78 | + 'contact' => $user->getPreference(setting_name : UserInterface::PREF_CONTACT_METHOD), |
|
| 79 | + 'registered' => $this->formatTimestamp(timestamp : (int) $user->getPreference(setting_name : UserInterface::PREF_TIMESTAMP_REGISTERED)), |
|
| 80 | + 'last_login' => $this->formatTimestamp(timestamp : (int) $user->getPreference(setting_name : UserInterface::PREF_TIMESTAMP_ACTIVE)), |
|
| 81 | 81 | ]) |
| 82 | 82 | ->values() |
| 83 | 83 | ->all(); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | return implode(separator: ',', array: $columns); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - private function quoteCsvValue(string|int $value): string |
|
| 134 | + private function quoteCsvValue(string | int $value): string |
|
| 135 | 135 | { |
| 136 | 136 | return '"' . addcslashes(string: (string) $value, characters: '"') . '"'; |
| 137 | 137 | } |
@@ -534,8 +534,8 @@ discard block |
||
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | public function chartLargestFamilies( |
| 537 | - string|null $color_from = null, |
|
| 538 | - string|null $color_to = null, |
|
| 537 | + string | null $color_from = null, |
|
| 538 | + string | null $color_to = null, |
|
| 539 | 539 | int $total = 10 |
| 540 | 540 | ): string { |
| 541 | 541 | return (new ChartFamilyLargest($this->color_service, $this->tree)) |
@@ -1271,13 +1271,13 @@ discard block |
||
| 1271 | 1271 | ->orderBy('d_julianday2'); |
| 1272 | 1272 | } |
| 1273 | 1273 | |
| 1274 | - public function statsMarr(string|null $color_from = null, string|null $color_to = null): string |
|
| 1274 | + public function statsMarr(string | null $color_from = null, string | null $color_to = null): string |
|
| 1275 | 1275 | { |
| 1276 | 1276 | return (new ChartMarriage($this->century_service, $this->color_service, $this->tree)) |
| 1277 | 1277 | ->chartMarriage($color_from, $color_to); |
| 1278 | 1278 | } |
| 1279 | 1279 | |
| 1280 | - public function statsDiv(string|null $color_from = null, string|null $color_to = null): string |
|
| 1280 | + public function statsDiv(string | null $color_from = null, string | null $color_to = null): string |
|
| 1281 | 1281 | { |
| 1282 | 1282 | return (new ChartDivorce($this->century_service, $this->color_service, $this->tree)) |
| 1283 | 1283 | ->chartDivorce($color_from, $color_to); |
@@ -40,8 +40,8 @@ |
||
| 40 | 40 | public function chartIndisWithSources( |
| 41 | 41 | int $total_individuals, |
| 42 | 42 | int $total_individuals_with_sources, |
| 43 | - string|null $color_from = null, |
|
| 44 | - string|null $color_to = null |
|
| 43 | + string | null $color_from = null, |
|
| 44 | + string | null $color_to = null |
|
| 45 | 45 | ): string { |
| 46 | 46 | $color_from ??= 'ffffff'; |
| 47 | 47 | $color_to ??= '84beff'; |