@@ -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 |
@@ -158,7 +158,7 @@ |
||
158 | 158 | $updated = 0; |
159 | 159 | |
160 | 160 | // Remove places with 0,0 coordinates at lower levels. |
161 | - $callback = static fn (array $place): bool => !str_contains($place['name'], ',') || $place['longitude'] !== 0.0 || $place['latitude'] !== 0.0; |
|
161 | + $callback = static fn(array $place): bool => !str_contains($place['name'], ',') || $place['longitude'] !== 0.0 || $place['latitude'] !== 0.0; |
|
162 | 162 | |
163 | 163 | $places = array_filter($places, $callback); |
164 | 164 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function isBetween(int $minimum, int $maximum): self |
82 | 82 | { |
83 | - $this->rules[] = static function (?int $value) use ($minimum, $maximum): ?int { |
|
83 | + $this->rules[] = static function (?int $value) use ($minimum, $maximum) : ?int { |
|
84 | 84 | if (is_int($value) && $value >= $minimum && $value <= $maximum) { |
85 | 85 | return $value; |
86 | 86 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function isLocalUrl(string $base_url): self |
100 | 100 | { |
101 | - $this->rules[] = static function (?string $value) use ($base_url): ?string { |
|
101 | + $this->rules[] = static function (?string $value) use ($base_url) : ?string { |
|
102 | 102 | if (is_string($value)) { |
103 | 103 | $value_info = parse_url($value); |
104 | 104 | $base_url_info = parse_url($base_url); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $value = null; |
156 | 156 | } |
157 | 157 | |
158 | - $callback = static fn (?array $value, Closure $rule): ?array => $rule($value); |
|
158 | + $callback = static fn(?array $value, Closure $rule) : ?array => $rule($value); |
|
159 | 159 | |
160 | 160 | return array_reduce($this->rules, $callback, $value); |
161 | 161 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $value = null; |
176 | 176 | } |
177 | 177 | |
178 | - $callback = static fn (?int $value, Closure $rule): ?int => $rule($value); |
|
178 | + $callback = static fn(?int $value, Closure $rule) : ?int => $rule($value); |
|
179 | 179 | |
180 | 180 | return array_reduce($this->rules, $callback, $value); |
181 | 181 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $value = null; |
194 | 194 | } |
195 | 195 | |
196 | - $callback = static fn (?string $value, Closure $rule): ?string => $rule($value); |
|
196 | + $callback = static fn(?string $value, Closure $rule) : ?string => $rule($value); |
|
197 | 197 | |
198 | 198 | return array_reduce($this->rules, $callback, $value); |
199 | 199 | } |
@@ -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); |