@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @return Menu|null |
202 | 202 | */ |
203 | - public function menuChangeBlocks(Tree $tree): Menu|null |
|
203 | + public function menuChangeBlocks(Tree $tree): Menu | null |
|
204 | 204 | { |
205 | 205 | $request = Registry::container()->get(ServerRequestInterface::class); |
206 | 206 | $route = Validator::attributes($request)->route(); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * |
224 | 224 | * @return Menu|null |
225 | 225 | */ |
226 | - public function menuControlPanel(Tree $tree): Menu|null |
|
226 | + public function menuControlPanel(Tree $tree): Menu | null |
|
227 | 227 | { |
228 | 228 | if (Auth::isAdmin()) { |
229 | 229 | return new Menu(I18N::translate('Control panel'), route(ControlPanel::class), 'menu-admin'); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * |
242 | 242 | * @return Menu|null |
243 | 243 | */ |
244 | - public function menuLanguages(): Menu|null |
|
244 | + public function menuLanguages(): Menu | null |
|
245 | 245 | { |
246 | 246 | $menu = new Menu(I18N::translate('Language'), '#', 'menu-language'); |
247 | 247 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * |
266 | 266 | * @return Menu|null |
267 | 267 | */ |
268 | - public function menuLogin(): Menu|null |
|
268 | + public function menuLogin(): Menu | null |
|
269 | 269 | { |
270 | 270 | if (Auth::check()) { |
271 | 271 | return null; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | * |
295 | 295 | * @return Menu|null |
296 | 296 | */ |
297 | - public function menuLogout(): Menu|null |
|
297 | + public function menuLogout(): Menu | null |
|
298 | 298 | { |
299 | 299 | if (Auth::check()) { |
300 | 300 | $parameters = [ |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | * |
316 | 316 | * @return Menu |
317 | 317 | */ |
318 | - public function menuMyAccount(Tree|null $tree): Menu |
|
318 | + public function menuMyAccount(Tree | null $tree): Menu |
|
319 | 319 | { |
320 | 320 | $url = route(AccountEdit::class, ['tree' => $tree?->name()]); |
321 | 321 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | * |
330 | 330 | * @return Menu|null |
331 | 331 | */ |
332 | - public function menuMyIndividualRecord(Tree $tree): Menu|null |
|
332 | + public function menuMyIndividualRecord(Tree $tree): Menu | null |
|
333 | 333 | { |
334 | 334 | $record = Registry::individualFactory()->make($tree->getUserPreference(Auth::user(), UserInterface::PREF_TREE_ACCOUNT_XREF), $tree); |
335 | 335 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | * |
360 | 360 | * @return Menu|null |
361 | 361 | */ |
362 | - public function menuMyPages(Tree|null $tree): Menu|null |
|
362 | + public function menuMyPages(Tree | null $tree): Menu | null |
|
363 | 363 | { |
364 | 364 | if (Auth::check()) { |
365 | 365 | if ($tree instanceof Tree) { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | * |
387 | 387 | * @return Menu|null |
388 | 388 | */ |
389 | - public function menuMyPedigree(Tree $tree): Menu|null |
|
389 | + public function menuMyPedigree(Tree $tree): Menu | null |
|
390 | 390 | { |
391 | 391 | $my_xref = $tree->getUserPreference(Auth::user(), UserInterface::PREF_TREE_ACCOUNT_XREF); |
392 | 392 | |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | * |
418 | 418 | * @return Menu|null |
419 | 419 | */ |
420 | - public function menuPendingChanges(Tree|null $tree): Menu|null |
|
420 | + public function menuPendingChanges(Tree | null $tree): Menu | null |
|
421 | 421 | { |
422 | 422 | if ($tree instanceof Tree && $tree->hasPendingEdit() && Auth::isModerator($tree)) { |
423 | 423 | $request = Registry::container()->get(ServerRequestInterface::class); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * |
439 | 439 | * @return Menu|null |
440 | 440 | */ |
441 | - public function menuThemes(): Menu|null |
|
441 | + public function menuThemes(): Menu | null |
|
442 | 442 | { |
443 | 443 | $module_service = Registry::container()->get(ModuleService::class); |
444 | 444 | $themes = $module_service->findByInterface(ModuleThemeInterface::class, false, true); |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | * |
468 | 468 | * @return array<Menu> |
469 | 469 | */ |
470 | - public function genealogyMenu(Tree|null $tree): array |
|
470 | + public function genealogyMenu(Tree | null $tree): array |
|
471 | 471 | { |
472 | 472 | if ($tree === null) { |
473 | 473 | return []; |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | |
478 | 478 | return $module_service |
479 | 479 | ->findByComponent(ModuleMenuInterface::class, $tree, Auth::user()) |
480 | - ->map(static fn (ModuleMenuInterface $menu): Menu|null => $menu->getMenu($tree)) |
|
480 | + ->map(static fn (ModuleMenuInterface $menu): Menu | null => $menu->getMenu($tree)) |
|
481 | 481 | ->filter() |
482 | 482 | ->all(); |
483 | 483 | } |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | * |
502 | 502 | * @return array<Menu> |
503 | 503 | */ |
504 | - public function userMenu(Tree|null $tree): array |
|
504 | + public function userMenu(Tree | null $tree): array |
|
505 | 505 | { |
506 | 506 | return array_filter([ |
507 | 507 | $this->menuPendingChanges($tree), |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * |
86 | 86 | * @return Menu|null |
87 | 87 | */ |
88 | - public function getMenu(Tree $tree): Menu|null |
|
88 | + public function getMenu(Tree $tree): Menu | null |
|
89 | 89 | { |
90 | 90 | $trees = $this->tree_service->all(); |
91 | 91 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return Collection<int,string>|null |
93 | 93 | */ |
94 | - protected function familiesToFix(Tree $tree, array $params): Collection|null |
|
94 | + protected function familiesToFix(Tree $tree, array $params): Collection | null |
|
95 | 95 | { |
96 | 96 | if ($params['search-for'] === '' || $params['replace-with'] === '') { |
97 | 97 | return null; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @return Collection<int,string>|null |
115 | 115 | */ |
116 | - protected function individualsToFix(Tree $tree, array $params): Collection|null |
|
116 | + protected function individualsToFix(Tree $tree, array $params): Collection | null |
|
117 | 117 | { |
118 | 118 | if ($params['search-for'] === '' || $params['replace-with'] === '') { |
119 | 119 | return null; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * |
134 | 134 | * @return Collection<int,string>|null |
135 | 135 | */ |
136 | - protected function familiesToFix(Tree $tree, array $params): Collection|null |
|
136 | + protected function familiesToFix(Tree $tree, array $params): Collection | null |
|
137 | 137 | { |
138 | 138 | if ($params['type'] !== Family::RECORD_TYPE || $params['search-for'] === '') { |
139 | 139 | return null; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @return Collection<int,string>|null |
156 | 156 | */ |
157 | - protected function individualsToFix(Tree $tree, array $params): Collection|null |
|
157 | + protected function individualsToFix(Tree $tree, array $params): Collection | null |
|
158 | 158 | { |
159 | 159 | if ($params['type'] !== Individual::RECORD_TYPE || $params['search-for'] === '') { |
160 | 160 | return null; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @return Collection<int,string>|null |
179 | 179 | */ |
180 | - protected function locationsToFix(Tree $tree, array $params): Collection|null |
|
180 | + protected function locationsToFix(Tree $tree, array $params): Collection | null |
|
181 | 181 | { |
182 | 182 | if ($params['type'] !== Location::RECORD_TYPE || $params['search-for'] === '') { |
183 | 183 | return null; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * |
202 | 202 | * @return Collection<int,string>|null |
203 | 203 | */ |
204 | - protected function mediaToFix(Tree $tree, array $params): Collection|null |
|
204 | + protected function mediaToFix(Tree $tree, array $params): Collection | null |
|
205 | 205 | { |
206 | 206 | if ($params['type'] !== Media::RECORD_TYPE || $params['search-for'] === '') { |
207 | 207 | return null; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * |
225 | 225 | * @return Collection<int,string>|null |
226 | 226 | */ |
227 | - protected function notesToFix(Tree $tree, array $params): Collection|null |
|
227 | + protected function notesToFix(Tree $tree, array $params): Collection | null |
|
228 | 228 | { |
229 | 229 | if ($params['type'] !== Note::RECORD_TYPE || $params['search-for'] === '') { |
230 | 230 | return null; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * |
249 | 249 | * @return Collection<int,string>|null |
250 | 250 | */ |
251 | - protected function repositoriesToFix(Tree $tree, array $params): Collection|null |
|
251 | + protected function repositoriesToFix(Tree $tree, array $params): Collection | null |
|
252 | 252 | { |
253 | 253 | if ($params['type'] !== Repository::RECORD_TYPE || $params['search-for'] === '') { |
254 | 254 | return null; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * |
273 | 273 | * @return Collection<int,string>|null |
274 | 274 | */ |
275 | - protected function sourcesToFix(Tree $tree, array $params): Collection|null |
|
275 | + protected function sourcesToFix(Tree $tree, array $params): Collection | null |
|
276 | 276 | { |
277 | 277 | if ($params['type'] !== Source::RECORD_TYPE || $params['search-for'] === '') { |
278 | 278 | return null; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | * |
295 | 295 | * @return Collection<int,string>|null |
296 | 296 | */ |
297 | - protected function submittersToFix(Tree $tree, array $params): Collection|null |
|
297 | + protected function submittersToFix(Tree $tree, array $params): Collection | null |
|
298 | 298 | { |
299 | 299 | if ($params['type'] !== Submitter::RECORD_TYPE || $params['search-for'] === '') { |
300 | 300 | return null; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * |
61 | 61 | * @return array<Menu> |
62 | 62 | */ |
63 | - public function userMenu(Tree|null $tree): array |
|
63 | + public function userMenu(Tree | null $tree): array |
|
64 | 64 | { |
65 | 65 | return array_filter([ |
66 | 66 | $this->menuPendingChanges($tree), |
@@ -69,7 +69,7 @@ |
||
69 | 69 | * |
70 | 70 | * @return Menu|null |
71 | 71 | */ |
72 | - public function getMenu(Tree $tree): Menu|null |
|
72 | + public function getMenu(Tree $tree): Menu | null |
|
73 | 73 | { |
74 | 74 | return null; |
75 | 75 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * |
156 | 156 | * @return Collection<int,string>|null |
157 | 157 | */ |
158 | - protected function familiesToFix(Tree $tree, array $params): Collection|null |
|
158 | + protected function familiesToFix(Tree $tree, array $params): Collection | null |
|
159 | 159 | { |
160 | 160 | return null; |
161 | 161 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | * |
187 | 187 | * @return Collection<int,string>|null |
188 | 188 | */ |
189 | - protected function individualsToFix(Tree $tree, array $params): Collection|null |
|
189 | + protected function individualsToFix(Tree $tree, array $params): Collection | null |
|
190 | 190 | { |
191 | 191 | return null; |
192 | 192 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * |
218 | 218 | * @return Collection<int,string>|null |
219 | 219 | */ |
220 | - protected function locationsToFix(Tree $tree, array $params): Collection|null |
|
220 | + protected function locationsToFix(Tree $tree, array $params): Collection | null |
|
221 | 221 | { |
222 | 222 | return null; |
223 | 223 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * |
250 | 250 | * @return Collection<int,string>|null |
251 | 251 | */ |
252 | - protected function mediaToFix(Tree $tree, array $params): Collection|null |
|
252 | + protected function mediaToFix(Tree $tree, array $params): Collection | null |
|
253 | 253 | { |
254 | 254 | return null; |
255 | 255 | } |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | * |
281 | 281 | * @return Collection<int,string>|null |
282 | 282 | */ |
283 | - protected function notesToFix(Tree $tree, array $params): Collection|null |
|
283 | + protected function notesToFix(Tree $tree, array $params): Collection | null |
|
284 | 284 | { |
285 | 285 | return null; |
286 | 286 | } |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * |
313 | 313 | * @return Collection<int,string>|null |
314 | 314 | */ |
315 | - protected function repositoriesToFix(Tree $tree, array $params): Collection|null |
|
315 | + protected function repositoriesToFix(Tree $tree, array $params): Collection | null |
|
316 | 316 | { |
317 | 317 | return null; |
318 | 318 | } |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | * |
345 | 345 | * @return Collection<int,string>|null |
346 | 346 | */ |
347 | - protected function sourcesToFix(Tree $tree, array $params): Collection|null |
|
347 | + protected function sourcesToFix(Tree $tree, array $params): Collection | null |
|
348 | 348 | { |
349 | 349 | return null; |
350 | 350 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | * |
376 | 376 | * @return Collection<int,string>|null |
377 | 377 | */ |
378 | - protected function submittersToFix(Tree $tree, array $params): Collection|null |
|
378 | + protected function submittersToFix(Tree $tree, array $params): Collection | null |
|
379 | 379 | { |
380 | 380 | return null; |
381 | 381 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public string $qual2 = ''; |
46 | 46 | |
47 | 47 | // Optional second date |
48 | - private AbstractCalendarDate|null $date2 = null; |
|
48 | + private AbstractCalendarDate | null $date2 = null; |
|
49 | 49 | |
50 | 50 | // Optional text, as included with an INTerpreted date |
51 | 51 | private string $text = ''; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @return string |
100 | 100 | */ |
101 | - public function display(Tree|null $tree = null, string|null $date_format = null, bool $convert_calendars = false): string |
|
101 | + public function display(Tree | null $tree = null, string | null $date_format = null, bool $convert_calendars = false): string |
|
102 | 102 | { |
103 | 103 | if ($tree instanceof Tree) { |
104 | 104 | $CALENDAR_FORMAT = $tree->getPreference('CALENDAR_FORMAT'); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | public function addYears(int $years, string $qualifier = ''): Date |
304 | 304 | { |
305 | 305 | $tmp = clone $this; |
306 | - $tmp->date1->year += $years; |
|
306 | + $tmp->date1->year += $years; |
|
307 | 307 | $tmp->date1->month = 0; |
308 | 308 | $tmp->date1->day = 0; |
309 | 309 | $tmp->date1->setJdFromYmd(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Create a individual. |
40 | 40 | */ |
41 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Source|null |
|
41 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Source | null |
|
42 | 42 | { |
43 | 43 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
44 | 44 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return Source |
79 | 79 | */ |
80 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Source |
|
80 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Source |
|
81 | 81 | { |
82 | 82 | return new Source($xref, $gedcom, $pending, $tree); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string|null |
92 | 92 | */ |
93 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
93 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
94 | 94 | { |
95 | 95 | return DB::table('sources') |
96 | 96 | ->where('s_id', '=', $xref) |