@@ -81,10 +81,10 @@ |
||
| 81 | 81 | * |
| 82 | 82 | * @return Menu|null |
| 83 | 83 | */ |
| 84 | - public function getMenu(Tree $tree): Menu|null |
|
| 84 | + public function getMenu(Tree $tree): Menu | null |
|
| 85 | 85 | { |
| 86 | 86 | $submenus = $this->module_service->findByComponent(ModuleListInterface::class, $tree, Auth::user()) |
| 87 | - ->map(static fn (ModuleListInterface $module): Menu|null => $module->listMenu($tree)) |
|
| 87 | + ->map(static fn (ModuleListInterface $module): Menu | null => $module->listMenu($tree)) |
|
| 88 | 88 | ->filter() |
| 89 | 89 | ->sort(static fn (Menu $x, Menu $y): int => I18N::comparator()($x->getLabel(), $y->getLabel())); |
| 90 | 90 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | // Find the requested individuals. |
| 161 | 161 | $individuals = (new Collection($xrefs)) |
| 162 | 162 | ->uniqueStrict() |
| 163 | - ->map(static fn (string $xref): Individual|null => Registry::individualFactory()->make($xref, $tree)) |
|
| 163 | + ->map(static fn (string $xref): Individual | null => Registry::individualFactory()->make($xref, $tree)) |
|
| 164 | 164 | ->filter() |
| 165 | 165 | ->filter(GedcomRecord::accessFilter()); |
| 166 | 166 | |
@@ -179,9 +179,9 @@ discard block |
||
| 179 | 179 | ]); |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | - $individuals = array_map(static fn (string $xref): Individual|null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 182 | + $individuals = array_map(static fn (string $xref): Individual | null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 183 | 183 | |
| 184 | - $individuals = array_filter($individuals, static fn (Individual|null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 184 | + $individuals = array_filter($individuals, static fn (Individual | null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 185 | 185 | |
| 186 | 186 | if ($ajax) { |
| 187 | 187 | $this->layout = 'layouts/ajax'; |
@@ -237,9 +237,9 @@ discard block |
||
| 237 | 237 | protected function chart(Tree $tree, array $xrefs, int $scale): ResponseInterface |
| 238 | 238 | { |
| 239 | 239 | /** @var Individual[] $individuals */ |
| 240 | - $individuals = array_map(static fn (string $xref): Individual|null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 240 | + $individuals = array_map(static fn (string $xref): Individual | null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 241 | 241 | |
| 242 | - $individuals = array_filter($individuals, static fn (Individual|null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 242 | + $individuals = array_filter($individuals, static fn (Individual | null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 243 | 243 | |
| 244 | 244 | $baseyear = (int) date('Y'); |
| 245 | 245 | $topyear = 0; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | switch ($firstLetter) { |
| 94 | 94 | case 'c': |
| 95 | 95 | $families = Collection::make(explode(',', $json_request)) |
| 96 | - ->map(static fn (string $xref): Family|null => Registry::familyFactory()->make($xref, $tree)) |
|
| 96 | + ->map(static fn (string $xref): Family | null => Registry::familyFactory()->make($xref, $tree)) |
|
| 97 | 97 | ->filter(); |
| 98 | 98 | |
| 99 | 99 | $r[] = $this->drawChildren($families, 1, true); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * |
| 148 | 148 | * @return string |
| 149 | 149 | */ |
| 150 | - private function getPersonDetails(Individual $individual, Family|null $family = null): string |
|
| 150 | + private function getPersonDetails(Individual $individual, Family | null $family = null): string |
|
| 151 | 151 | { |
| 152 | 152 | $chart_url = route('module', [ |
| 153 | 153 | 'module' => 'tree', |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | * |
| 236 | 236 | * @return string |
| 237 | 237 | */ |
| 238 | - private function drawPerson(Individual $person, int $gen, int $state, Family|null $pfamily, string $line, bool $isRoot): string |
|
| 238 | + private function drawPerson(Individual $person, int $gen, int $state, Family | null $pfamily, string $line, bool $isRoot): string |
|
| 239 | 239 | { |
| 240 | 240 | if ($gen < 0) { |
| 241 | 241 | return ''; |
@@ -248,9 +248,9 @@ |
||
| 248 | 248 | protected function chart(Tree $tree, array $xrefs): ResponseInterface |
| 249 | 249 | { |
| 250 | 250 | /** @var Individual[] $individuals */ |
| 251 | - $individuals = array_map(static fn (string $xref): Individual|null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 251 | + $individuals = array_map(static fn (string $xref): Individual | null => Registry::individualFactory()->make($xref, $tree), $xrefs); |
|
| 252 | 252 | |
| 253 | - $individuals = array_filter($individuals, static fn (Individual|null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 253 | + $individuals = array_filter($individuals, static fn (Individual | null $individual): bool => $individual instanceof Individual && $individual->canShow()); |
|
| 254 | 254 | |
| 255 | 255 | // Sort the array in order of birth year |
| 256 | 256 | usort($individuals, Individual::birthDateComparator()); |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | /** |
| 76 | 76 | * Get the first media file that contains an image. |
| 77 | 77 | */ |
| 78 | - public function firstImageFile(): MediaFile|null |
|
| 78 | + public function firstImageFile(): MediaFile | null |
|
| 79 | 79 | { |
| 80 | 80 | return $this->mediaFiles() |
| 81 | 81 | ->first(static fn (MediaFile $media_file): bool => $media_file->isImage() && !$media_file->isExternal()); |
@@ -1069,7 +1069,7 @@ |
||
| 1069 | 1069 | * @param Expression|string $column |
| 1070 | 1070 | * @param array<string> $search_terms |
| 1071 | 1071 | */ |
| 1072 | - private function whereSearch(Builder $query, Expression|string $column, array $search_terms): void |
|
| 1072 | + private function whereSearch(Builder $query, Expression | string $column, array $search_terms): void |
|
| 1073 | 1073 | { |
| 1074 | 1074 | foreach ($search_terms as $search_term) { |
| 1075 | 1075 | $query->where($column, DB::iLike(), '%' . addcslashes($search_term, '\\%_') . '%'); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | return self::pdo()->getAttribute(PDO::ATTR_DRIVER_NAME); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - public static function exec(string $sql): int|false |
|
| 143 | + public static function exec(string $sql): int | false |
|
| 144 | 144 | { |
| 145 | 145 | return self::pdo()->exec($sql); |
| 146 | 146 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - public static function binaryColumn(string $column, string|null $alias = null): Expression |
|
| 208 | + public static function binaryColumn(string $column, string | null $alias = null): Expression |
|
| 209 | 209 | { |
| 210 | 210 | if (self::driverName() === self::MYSQL) { |
| 211 | 211 | $sql = 'CAST(' . $column . ' AS binary)'; |
@@ -240,7 +240,7 @@ |
||
| 240 | 240 | /** |
| 241 | 241 | * Run the application. |
| 242 | 242 | */ |
| 243 | - public function run(string $php_sapi): int|ResponseInterface |
|
| 243 | + public function run(string $php_sapi): int | ResponseInterface |
|
| 244 | 244 | { |
| 245 | 245 | if ($php_sapi === 'cli') { |
| 246 | 246 | return $this->bootstrap()->cliRequest(); |
@@ -72,11 +72,11 @@ |
||
| 72 | 72 | $user->realName(), |
| 73 | 73 | $user->email(), |
| 74 | 74 | Auth::isAdmin(user: $user) ? 'Yes' : 'No', |
| 75 | - $user->getPreference(setting_name: UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'Yes' : 'No', |
|
| 76 | - $user->getPreference(setting_name: UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'Yes' : 'No', |
|
| 77 | - $user->getPreference(setting_name: UserInterface::PREF_LANGUAGE), |
|
| 78 | - $user->getPreference(setting_name: UserInterface::PREF_TIME_ZONE), |
|
| 79 | - $user->getPreference(setting_name: UserInterface::PREF_CONTACT_METHOD), |
|
| 75 | + $user->getPreference(setting_name : UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'Yes' : 'No', |
|
| 76 | + $user->getPreference(setting_name : UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'Yes' : 'No', |
|
| 77 | + $user->getPreference(setting_name : UserInterface::PREF_LANGUAGE), |
|
| 78 | + $user->getPreference(setting_name : UserInterface::PREF_TIME_ZONE), |
|
| 79 | + $user->getPreference(setting_name : UserInterface::PREF_CONTACT_METHOD), |
|
| 80 | 80 | $registered, |
| 81 | 81 | $last_login, |
| 82 | 82 | ]); |