@@ -301,7 +301,7 @@ |
||
| 301 | 301 | { |
| 302 | 302 | $latest_version = $this->fetchLatestVersion(false); |
| 303 | 303 | |
| 304 | - [, , $url] = explode('|', $latest_version . '||'); |
|
| 304 | + [,, $url] = explode('|', $latest_version . '||'); |
|
| 305 | 305 | |
| 306 | 306 | return $url; |
| 307 | 307 | } |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | ->orderBy('d_type') |
| 233 | 233 | ->limit(1) |
| 234 | 234 | ->get() |
| 235 | - ->map(static fn (object $row): object => (object) [ |
|
| 235 | + ->map(static fn (object $row) : object => (object) [ |
|
| 236 | 236 | 'id' => $row->id, |
| 237 | 237 | 'year' => (int) $row->year, |
| 238 | 238 | 'fact' => $row->fact, |
@@ -1070,7 +1070,7 @@ |
||
| 1070 | 1070 | * @param Expression|string $column |
| 1071 | 1071 | * @param array<string> $search_terms |
| 1072 | 1072 | */ |
| 1073 | - private function whereSearch(Builder $query, Expression|string $column, array $search_terms): void |
|
| 1073 | + private function whereSearch(Builder $query, Expression | string $column, array $search_terms): void |
|
| 1074 | 1074 | { |
| 1075 | 1075 | foreach ($search_terms as $search_term) { |
| 1076 | 1076 | $query->where($column, $this->iLike(), '%' . addcslashes($search_term, '\\%_') . '%'); |
@@ -593,7 +593,7 @@ |
||
| 593 | 593 | ->groupBy([$this->binaryColumn('n_givn')]); |
| 594 | 594 | |
| 595 | 595 | foreach ($query->get() as $row) { |
| 596 | - $initial = I18N::strtoupper(I18N::language()->initialLetter($row->n_givn)); |
|
| 596 | + $initial = I18N::strtoupper(I18N::language()->initialLetter($row->n_givn)); |
|
| 597 | 597 | $initials[$initial] ??= 0; |
| 598 | 598 | $initials[$initial] += (int) $row->count; |
| 599 | 599 | } |
@@ -290,7 +290,8 @@ discard block |
||
| 290 | 290 | <li class="wt-initials-list-item d-flex"> |
| 291 | 291 | <?php if ($count > 0) : ?> |
| 292 | 292 | <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'show_marnm' => $show_marnm, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->displaySurnameInitial((string) $letter) ?></a> |
| 293 | - <?php else : ?> |
|
| 293 | + <?php else { |
|
| 294 | + : ?> |
|
| 294 | 295 | <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span> |
| 295 | 296 | |
| 296 | 297 | <?php endif ?> |
@@ -345,6 +346,7 @@ discard block |
||
| 345 | 346 | switch ($alpha) { |
| 346 | 347 | case '@': |
| 347 | 348 | $filter = static fn(string $x): bool => $x === Individual::NOMEN_NESCIO; |
| 349 | +} |
|
| 348 | 350 | break; |
| 349 | 351 | case ',': |
| 350 | 352 | $filter = static fn(string $x): bool => $x === ''; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function isBetween(int $minimum, int $maximum): self |
| 127 | 127 | { |
| 128 | - $this->rules[] = static function (?int $value) use ($minimum, $maximum): ?int { |
|
| 128 | + $this->rules[] = static function (?int $value) use ($minimum, $maximum) : ?int { |
|
| 129 | 129 | if (is_int($value) && $value >= $minimum && $value <= $maximum) { |
| 130 | 130 | return $value; |
| 131 | 131 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function isInArray(array $values): self |
| 145 | 145 | { |
| 146 | - $this->rules[] = static fn (int|string|null $value): int|string|null => in_array($value, $values, true) ? $value : null; |
|
| 146 | + $this->rules[] = static fn (int | string | null $value): int | string | null => in_array($value, $values, true) ? $value : null; |
|
| 147 | 147 | |
| 148 | 148 | return $this; |
| 149 | 149 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function isNotEmpty(): self |
| 165 | 165 | { |
| 166 | - $this->rules[] = static fn (?string $value): ?string => $value !== null && $value !== '' ? $value : null; |
|
| 166 | + $this->rules[] = static fn (?string $value) : ?string => $value !== null && $value !== '' ? $value : null; |
|
| 167 | 167 | |
| 168 | 168 | return $this; |
| 169 | 169 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | { |
| 176 | 176 | $base_url = $this->request->getAttribute('base_url', ''); |
| 177 | 177 | |
| 178 | - $this->rules[] = static function (?string $value) use ($base_url): ?string { |
|
| 178 | + $this->rules[] = static function (?string $value) use ($base_url) : ?string { |
|
| 179 | 179 | if ($value !== null) { |
| 180 | 180 | $value_info = parse_url($value); |
| 181 | 181 | $base_url_info = parse_url($base_url); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter)); |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - $callback = static fn (?array $value, Closure $rule): ?array => $rule($value); |
|
| 282 | + $callback = static fn (?array $value, Closure $rule) : ?array => $rule($value); |
|
| 283 | 283 | |
| 284 | 284 | return array_reduce($this->rules, $callback, $value) ?? []; |
| 285 | 285 | } |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | $value = null; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - $callback = static fn (?float $value, Closure $rule): ?float => $rule($value); |
|
| 303 | + $callback = static fn (?float $value, Closure $rule) : ?float => $rule($value); |
|
| 304 | 304 | |
| 305 | 305 | $value = array_reduce($this->rules, $callback, $value) ?? $default; |
| 306 | 306 | |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | $value = null; |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | - $callback = static fn (?int $value, Closure $rule): ?int => $rule($value); |
|
| 336 | + $callback = static fn (?int $value, Closure $rule) : ?int => $rule($value); |
|
| 337 | 337 | |
| 338 | 338 | $value = array_reduce($this->rules, $callback, $value) ?? $default; |
| 339 | 339 | |
@@ -374,9 +374,9 @@ discard block |
||
| 374 | 374 | $value = null; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | - $callback = static fn (?string $value, Closure $rule): ?string => $rule($value); |
|
| 377 | + $callback = static fn (?string $value, Closure $rule) : ?string => $rule($value); |
|
| 378 | 378 | |
| 379 | - $value = array_reduce($this->rules, $callback, $value) ?? $default; |
|
| 379 | + $value = array_reduce($this->rules, $callback, $value) ?? $default; |
|
| 380 | 380 | |
| 381 | 381 | if ($value === null) { |
| 382 | 382 | throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter)); |