@@ -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 |
@@ -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 | [ |
@@ -298,9 +298,9 @@ discard block |
||
| 298 | 298 | try { |
| 299 | 299 | $files = $filesystem |
| 300 | 300 | ->listContents($folder, $subfolders) |
| 301 | - ->filter(fn (StorageAttributes $attributes): bool => $attributes->isFile()) |
|
| 302 | - ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 303 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path()) |
|
| 301 | + ->filter(fn(StorageAttributes $attributes): bool => $attributes->isFile()) |
|
| 302 | + ->filter(fn(StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 303 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path()) |
|
| 304 | 304 | ->toArray(); |
| 305 | 305 | } catch (FilesystemException $ex) { |
| 306 | 306 | $files = []; |
@@ -348,9 +348,9 @@ discard block |
||
| 348 | 348 | { |
| 349 | 349 | $folders = Registry::filesystem()->media($tree) |
| 350 | 350 | ->listContents('', FilesystemReader::LIST_DEEP) |
| 351 | - ->filter(fn (StorageAttributes $attributes): bool => $attributes->isDir()) |
|
| 352 | - ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 353 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path()) |
|
| 351 | + ->filter(fn(StorageAttributes $attributes): bool => $attributes->isDir()) |
|
| 352 | + ->filter(fn(StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 353 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path()) |
|
| 354 | 354 | ->toArray(); |
| 355 | 355 | |
| 356 | 356 | return new Collection($folders); |
@@ -395,9 +395,9 @@ discard block |
||
| 395 | 395 | foreach ($media_roots as $media_folder) { |
| 396 | 396 | $tmp = $data_filesystem |
| 397 | 397 | ->listContents($media_folder, FilesystemReader::LIST_DEEP) |
| 398 | - ->filter(fn (StorageAttributes $attributes): bool => $attributes->isDir()) |
|
| 399 | - ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 400 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path() . '/') |
|
| 398 | + ->filter(fn(StorageAttributes $attributes): bool => $attributes->isDir()) |
|
| 399 | + ->filter(fn(StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) |
|
| 400 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path() . '/') |
|
| 401 | 401 | ->toArray(); |
| 402 | 402 | |
| 403 | 403 | $disk_folders = $disk_folders->concat($tmp); |
@@ -457,7 +457,7 @@ |
||
| 457 | 457 | public function addYears(int $years, string $qualifier = ''): Date |
| 458 | 458 | { |
| 459 | 459 | $tmp = clone $this; |
| 460 | - $tmp->date1->year += $years; |
|
| 460 | + $tmp->date1->year += $years; |
|
| 461 | 461 | $tmp->date1->month = 0; |
| 462 | 462 | $tmp->date1->day = 0; |
| 463 | 463 | $tmp->date1->setJdFromYmd(); |
@@ -431,7 +431,7 @@ |
||
| 431 | 431 | ]); |
| 432 | 432 | |
| 433 | 433 | $text_lines = array_map( |
| 434 | - fn (string $line): string => $this->fitTextToPixelWidth($line, $max_text_length), |
|
| 434 | + fn(string $line): string => $this->fitTextToPixelWidth($line, $max_text_length), |
|
| 435 | 435 | $text_lines |
| 436 | 436 | ); |
| 437 | 437 | |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | 'style' => Validator::parsedBody($request)->string('style', ''), |
| 233 | 233 | 'width' => Validator::parsedBody($request)->string('width', ''), |
| 234 | 234 | 'xref' => Validator::parsedBody($request)->string('xref', ''), |
| 235 | - ]); |
|
| 235 | + ]); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | Auth::checkComponentAccess($this, ModuleChartInterface::class, $tree, $user); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | 'generations' => 3, |
| 118 | 118 | 'layout' => PedigreeChartModule::STYLE_RIGHT, |
| 119 | 119 | ]); |
| 120 | - $content = view('modules/charts/chart', [ |
|
| 120 | + $content = view('modules/charts/chart', [ |
|
| 121 | 121 | 'block_id' => $block_id, |
| 122 | 122 | 'chart_url' => $chart_url, |
| 123 | 123 | ]); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | 'generations' => 2, |
| 138 | 138 | 'chart_style' => DescendancyChartModule::CHART_STYLE_TREE, |
| 139 | 139 | ]); |
| 140 | - $content = view('modules/charts/chart', [ |
|
| 140 | + $content = view('modules/charts/chart', [ |
|
| 141 | 141 | 'block_id' => $block_id, |
| 142 | 142 | 'chart_url' => $chart_url, |
| 143 | 143 | ]); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | 'ajax' => true, |
| 158 | 158 | 'generations' => 2, |
| 159 | 159 | ]); |
| 160 | - $content = view('modules/charts/chart', [ |
|
| 160 | + $content = view('modules/charts/chart', [ |
|
| 161 | 161 | 'block_id' => $block_id, |
| 162 | 162 | 'chart_url' => $chart_url, |
| 163 | 163 | ]); |