@@ -100,7 +100,7 @@ |
||
| 100 | 100 | * |
| 101 | 101 | * @return Collection<int,string>|null |
| 102 | 102 | */ |
| 103 | - protected function individualsToFix(Tree $tree, array $params): Collection|null |
|
| 103 | + protected function individualsToFix(Tree $tree, array $params): Collection | null |
|
| 104 | 104 | { |
| 105 | 105 | return $this->individualsToFixQuery($tree, $params) |
| 106 | 106 | ->where(static function (Builder $query): void { |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | /** |
| 105 | 105 | * Return a menu item for this chart - for use in individual boxes. |
| 106 | 106 | */ |
| 107 | - public function chartBoxMenu(Individual $individual): Menu|null |
|
| 107 | + public function chartBoxMenu(Individual $individual): Menu | null |
|
| 108 | 108 | { |
| 109 | 109 | return $this->chartMenu($individual); |
| 110 | 110 | } |
@@ -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 | |
@@ -378,7 +378,7 @@ |
||
| 378 | 378 | * |
| 379 | 379 | * @return string |
| 380 | 380 | */ |
| 381 | - private function getDescendantsHtml(Tree $tree, array $individuals, array $ancestors, string $surname, bool $soundex_dm, bool $soundex_std, Individual $individual, Family|null $parents = null): string |
|
| 381 | + private function getDescendantsHtml(Tree $tree, array $individuals, array $ancestors, string $surname, bool $soundex_dm, bool $soundex_std, Individual $individual, Family | null $parents = null): string |
|
| 382 | 382 | { |
| 383 | 383 | $module = $this->module_service |
| 384 | 384 | ->findByComponent(ModuleChartInterface::class, $tree, Auth::user()) |
@@ -57,5 +57,5 @@ |
||
| 57 | 57 | * |
| 58 | 58 | * @return Menu|null |
| 59 | 59 | */ |
| 60 | - public function getMenu(Tree $tree): Menu|null; |
|
| 60 | + public function getMenu(Tree $tree): Menu | null; |
|
| 61 | 61 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * |
| 93 | 93 | * @return Collection<int,string>|null |
| 94 | 94 | */ |
| 95 | - protected function individualsToFix(Tree $tree, array $params): Collection|null |
|
| 95 | + protected function individualsToFix(Tree $tree, array $params): Collection | null |
|
| 96 | 96 | { |
| 97 | 97 | // No DB querying possible? Select all. |
| 98 | 98 | return $this->individualsToFixQuery($tree, $params) |
@@ -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; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | /** |
| 148 | 148 | * A menu, to be added to the main application menu. |
| 149 | 149 | */ |
| 150 | - public function getMenu(Tree $tree): Menu|null |
|
| 150 | + public function getMenu(Tree $tree): Menu | null |
|
| 151 | 151 | { |
| 152 | 152 | $request = Registry::container()->get(ServerRequestInterface::class); |
| 153 | 153 | $route = Validator::attributes($request)->route(); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | $xrefs = array_map('strval', $xrefs); // PHP converts numeric keys to integers. |
| 410 | 410 | |
| 411 | 411 | // Fetch all the records in the cart. |
| 412 | - $records = array_map(static fn(string $xref): GedcomRecord|null => Registry::gedcomRecordFactory()->make($xref, $tree), $xrefs); |
|
| 412 | + $records = array_map(static fn(string $xref): GedcomRecord | null => Registry::gedcomRecordFactory()->make($xref, $tree), $xrefs); |
|
| 413 | 413 | |
| 414 | 414 | // Some records may have been deleted after they were added to the cart. |
| 415 | 415 | $records = array_filter($records); |
@@ -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 ''; |