@@ -154,7 +154,7 @@ |
||
154 | 154 | { |
155 | 155 | $tree = Validator::attributes($request)->treeOptional(); |
156 | 156 | $default = Site::getPreference('DEFAULT_GEDCOM'); |
157 | - $tree ??= $this->tree_service->all()[$default] ?? $this->tree_service->all()->first(); |
|
157 | + $tree ??= $this->tree_service->all()[$default] ?? $this->tree_service->all()->first(); |
|
158 | 158 | |
159 | 159 | $status_code = $exception->getCode(); |
160 | 160 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | if ($record instanceof Individual) { |
102 | 102 | $facts = $record->facts(static::INDIVIDUAL_EVENTS, true) |
103 | - ->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
103 | + ->merge($record->spouseFamilies()->map(fn(Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
104 | 104 | } elseif ($record instanceof Family) { |
105 | 105 | $facts = $record->facts(static::FAMILY_EVENTS, true); |
106 | 106 | } else { |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | // iCalendar only supports exact Gregorian dates. |
111 | 111 | $facts = $facts |
112 | 112 | ->flatten() |
113 | - ->filter(fn (Fact $fact): bool => $fact->date()->isOK()) |
|
114 | - ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '') |
|
115 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
116 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
117 | - ->mapWithKeys(fn (Fact $fact): array => [ |
|
113 | + ->filter(fn(Fact $fact): bool => $fact->date()->isOK()) |
|
114 | + ->filter(fn(Fact $fact): bool => $fact->date()->qual1 === '') |
|
115 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
116 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
117 | + ->mapWithKeys(fn(Fact $fact): array => [ |
|
118 | 118 | route(static::class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact->id()]) => |
119 | 119 | $fact->label() . ' — ' . $fact->date()->display(), |
120 | 120 | ]); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $record = Auth::checkRecordAccess($record); |
147 | 147 | |
148 | 148 | $fact = $record->facts() |
149 | - ->filter(fn (Fact $fact): bool => $fact->id() === $fact_id) |
|
149 | + ->filter(fn(Fact $fact): bool => $fact->id() === $fact_id) |
|
150 | 150 | ->first(); |
151 | 151 | |
152 | 152 | if ($fact instanceof Fact) { |
@@ -588,7 +588,7 @@ |
||
588 | 588 | |
589 | 589 | $module = $module_service |
590 | 590 | ->findByComponent(ModuleListInterface::class, $this->tree, Auth::user()) |
591 | - ->first(static fn (ModuleInterface $module): bool => $module instanceof IndividualListModule); |
|
591 | + ->first(static fn(ModuleInterface $module): bool => $module instanceof IndividualListModule); |
|
592 | 592 | |
593 | 593 | if ($type === 'list') { |
594 | 594 | return view('lists/surnames-bullet-list', [ |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | $pedigree_chart = $module_service |
399 | 399 | ->findByComponent(ModuleChartInterface::class, $tree, Auth::user()) |
400 | - ->first(static fn (ModuleInterface $module): bool => $module instanceof PedigreeChartModule); |
|
400 | + ->first(static fn(ModuleInterface $module): bool => $module instanceof PedigreeChartModule); |
|
401 | 401 | |
402 | 402 | if ($my_xref !== '' && $pedigree_chart instanceof PedigreeChartModule) { |
403 | 403 | $individual = Registry::individualFactory()->make($my_xref, $tree); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | |
487 | 487 | return $module_service |
488 | 488 | ->findByComponent(ModuleMenuInterface::class, $tree, Auth::user()) |
489 | - ->map(static fn (ModuleMenuInterface $menu): ?Menu => $menu->getMenu($tree)) |
|
489 | + ->map(static fn(ModuleMenuInterface $menu): ?Menu => $menu->getMenu($tree)) |
|
490 | 490 | ->filter() |
491 | 491 | ->all(); |
492 | 492 | } |
@@ -145,7 +145,7 @@ |
||
145 | 145 | // Find a module providing individual lists |
146 | 146 | $module = $this->module_service |
147 | 147 | ->findByComponent(ModuleListInterface::class, $tree, Auth::user()) |
148 | - ->first(static fn (ModuleInterface $module): bool => $module instanceof IndividualListModule); |
|
148 | + ->first(static fn(ModuleInterface $module): bool => $module instanceof IndividualListModule); |
|
149 | 149 | |
150 | 150 | $surnames = view('lists/surnames-compact-list', [ |
151 | 151 | 'module' => $module, |
@@ -328,7 +328,7 @@ |
||
328 | 328 | |
329 | 329 | $language = $this->module_service |
330 | 330 | ->findByInterface(ModuleLanguageInterface::class, true) |
331 | - ->first(fn (ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
331 | + ->first(fn(ModuleLanguageInterface $language): bool => $language->locale()->languageTag() === I18N::languageTag()); |
|
332 | 332 | |
333 | 333 | echo '<h3>', I18N::translate('Relationship: %s', $this->relationship_service->nameFromPath($nodes->all(), $language)), '</h3>'; |
334 | 334 | $num_paths++; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $path = (string) parse_url($url, PHP_URL_PATH); |
70 | 70 | |
71 | 71 | // Paths containing UTF-8 characters need special handling. |
72 | - $path = implode('/', array_map(static fn (string $x): string => rawurlencode($x), explode('/', $path))); |
|
72 | + $path = implode('/', array_map(static fn(string $x): string => rawurlencode($x), explode('/', $path))); |
|
73 | 73 | |
74 | 74 | session_name($secure ? self::SECURE_SESSION_NAME : self::SESSION_NAME); |
75 | 75 | session_register_shutdown(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * |
110 | 110 | * @return array|bool|int|null|string |
111 | 111 | */ |
112 | - public static function get(string $name, array|bool|int|string $default = null) |
|
112 | + public static function get(string $name, array | bool | int | string $default = null) |
|
113 | 113 | { |
114 | 114 | return $_SESSION[$name] ?? $default; |
115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @return array|bool|int|null|string |
123 | 123 | */ |
124 | - public static function pull(string $name): array|bool|int|null|string |
|
124 | + public static function pull(string $name): array | bool | int | null | string |
|
125 | 125 | { |
126 | 126 | $value = self::get($name); |
127 | 127 | self::forget($name); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * |
166 | 166 | * @return void |
167 | 167 | */ |
168 | - public static function put(string $name, array|bool|int|null|string $value): void |
|
168 | + public static function put(string $name, array | bool | int | null | string $value): void |
|
169 | 169 | { |
170 | 170 | $_SESSION[$name] = $value; |
171 | 171 | } |
@@ -296,7 +296,7 @@ |
||
296 | 296 | * @param string $abstract |
297 | 297 | * @param string|object $concrete |
298 | 298 | */ |
299 | - public static function set(string $abstract, string|object $concrete): void |
|
299 | + public static function set(string $abstract, string | object $concrete): void |
|
300 | 300 | { |
301 | 301 | if (is_string($concrete)) { |
302 | 302 | Container::getInstance()->bind($abstract, $concrete); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param array<string>|int|AbstractCalendarDate $date |
82 | 82 | */ |
83 | - protected function __construct(array|int|AbstractCalendarDate $date) |
|
83 | + protected function __construct(array | int | AbstractCalendarDate $date) |
|
84 | 84 | { |
85 | 85 | // Construct from an integer (a julian day number) |
86 | 86 | if (is_int($date)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->month = static::MONTH_TO_NUMBER[$date[1]] ?? 0; |
98 | 98 | |
99 | 99 | if ($this->month === 0) { |
100 | - $this->day = 0; |
|
100 | + $this->day = 0; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $this->year = $this->extractYear($date[0]); |