@@ -974,7 +974,7 @@ |
||
| 974 | 974 | array_walk($ydata, static function (array &$x) { |
| 975 | 975 | $sum = array_sum($x); |
| 976 | 976 | if ($sum > 0) { |
| 977 | - $x = array_map(static fn (float $y): float => $y * 100.0 / $sum, $x); |
|
| 977 | + $x = array_map(static fn(float $y): float => $y * 100.0 / $sum, $x); |
|
| 978 | 978 | } |
| 979 | 979 | }); |
| 980 | 980 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Sort the facts |
| 78 | - $callback = static fn (string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 78 | + $callback = static fn(string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 79 | 79 | uksort($sort_facts, $callback); |
| 80 | 80 | |
| 81 | 81 | // Merge the facts |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Sort the facts |
| 78 | - $callback = static fn (string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 78 | + $callback = static fn(string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 79 | 79 | uksort($sort_facts, $callback); |
| 80 | 80 | |
| 81 | 81 | // Merge the facts |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Sort the facts |
| 78 | - $callback = static fn (string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 78 | + $callback = static fn(string $x, string $y): int => array_search($x, $order, true) <=> array_search($y, $order, true); |
|
| 79 | 79 | uksort($sort_facts, $callback); |
| 80 | 80 | |
| 81 | 81 | // Merge the facts |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | /** @var Collection<GedcomRecord> $records */ |
| 94 | 94 | $records = $rows->map(function (object $row) use ($tree): ?GedcomRecord { |
| 95 | 95 | return $this->data_fix_service->getRecordByType($row->xref, $tree, $row->type); |
| 96 | - })->filter(static function (?GedcomRecord $record) use ($module, $params): bool { |
|
| 96 | + })->filter(static function (?GedcomRecord $record) use ($module, $params) : bool { |
|
| 97 | 97 | return $record instanceof GedcomRecord && !$record->isPendingDeletion() && $module->doesRecordNeedUpdate($record, $params); |
| 98 | 98 | }); |
| 99 | 99 | |
@@ -267,7 +267,7 @@ |
||
| 267 | 267 | |
| 268 | 268 | $lifespans = $this->layoutIndividuals($individuals); |
| 269 | 269 | |
| 270 | - $callback = static fn (int $carry, object $item): int => max($carry, $item->row); |
|
| 270 | + $callback = static fn(int $carry, object $item): int => max($carry, $item->row); |
|
| 271 | 271 | $max_rows = array_reduce($lifespans, $callback, 0); |
| 272 | 272 | |
| 273 | 273 | $count = count($xrefs); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | |
| 325 | 325 | self::$language = $module_service |
| 326 | 326 | ->findByInterface(ModuleLanguageInterface::class) |
| 327 | - ->first(fn (ModuleLanguageInterface $module): bool => $module->locale()->languageTag() === $code); |
|
| 327 | + ->first(fn(ModuleLanguageInterface $module): bool => $module->locale()->languageTag() === $code); |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | // Create a translator |
@@ -566,10 +566,10 @@ discard block |
||
| 566 | 566 | public static function comparator(): Closure |
| 567 | 567 | { |
| 568 | 568 | if (self::$collator instanceof Collator) { |
| 569 | - return static fn (string $x, string $y): int => (int) self::$collator->compare($x, $y); |
|
| 569 | + return static fn(string $x, string $y): int => (int) self::$collator->compare($x, $y); |
|
| 570 | 570 | } |
| 571 | 571 | |
| 572 | - return static fn (string $x, string $y): int => strcmp(self::strtolower($x), self::strtolower($y)); |
|
| 572 | + return static fn(string $x, string $y): int => strcmp(self::strtolower($x), self::strtolower($y)); |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | string $color_dead = null |
| 58 | 58 | ): string { |
| 59 | 59 | $color_living = $color_living ?? '#ffffff'; |
| 60 | - $color_dead = $color_dead ?? '#cccccc'; |
|
| 60 | + $color_dead = $color_dead ?? '#cccccc'; |
|
| 61 | 61 | |
| 62 | 62 | $data = [ |
| 63 | 63 | [ |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | $record = Auth::checkRecordAccess($record, true); |
| 75 | 75 | |
| 76 | 76 | // Find the fact to edit |
| 77 | - $fact = $record->facts()->first(fn (Fact $fact): bool => $fact->id() === $fact_id && $fact->canEdit()); |
|
| 77 | + $fact = $record->facts()->first(fn(Fact $fact): bool => $fact->id() === $fact_id && $fact->canEdit()); |
|
| 78 | 78 | |
| 79 | 79 | if ($fact === null) { |
| 80 | 80 | return redirect($record->url()); |