@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function find($user_id): ?User |
| 54 | 54 | { |
| 55 | - return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id): ?User { |
|
| 55 | + return Registry::cache()->array()->remember('user-' . $user_id, static function () use ($user_id) : ?User { |
|
| 56 | 56 | return DB::table('user') |
| 57 | 57 | ->where('user_id', '=', $user_id) |
| 58 | 58 | ->get() |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | '<div class="gedcom-data" dir="ltr">' . |
| 113 | 113 | preg_replace_callback( |
| 114 | 114 | '/@(' . Gedcom::REGEX_XREF . ')@/', |
| 115 | - static function (array $match) use ($tree): string { |
|
| 115 | + static function (array $match) use ($tree) : string { |
|
| 116 | 116 | $record = Registry::gedcomRecordFactory()->make($match[1], $tree); |
| 117 | 117 | |
| 118 | 118 | return $record ? '<a href="' . e($record->url()) . '">' . $match[0] . '</a>' : $match[0]; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $anniversary_facts = $this->calendar_service->getCalendarEvents($ged_year->minimumJulianDay(), $ged_year->maximumJulianDay(), $filterev, $tree, $filterof, $filtersx); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $anniversaries = Collection::make($anniversary_facts) |
|
| 109 | + $anniversaries = Collection::make($anniversary_facts) |
|
| 110 | 110 | ->unique() |
| 111 | 111 | ->sort(static function (Fact $x, Fact $y): int { |
| 112 | 112 | return $x->date()->minimumJulianDay() <=> $y->date()->minimumJulianDay(); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $html = ''; |
| 288 | 288 | |
| 289 | 289 | foreach ($list as $xref => $facts) { |
| 290 | - $tmp = Registry::gedcomRecordFactory()->make((string) $xref, $tree); |
|
| 290 | + $tmp = Registry::gedcomRecordFactory()->make((string) $xref, $tree); |
|
| 291 | 291 | $html .= $tag1 . '<a href="' . e($tmp->url()) . '">' . $tmp->fullName() . '</a> '; |
| 292 | 292 | $html .= '<div class="indent">' . $facts . '</div>' . $tag2; |
| 293 | 293 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | { |
| 50 | 50 | use ModuleChartTrait; |
| 51 | 51 | |
| 52 | - protected const ROUTE_URL = '/tree/{tree}/lifespans'; |
|
| 52 | + protected const ROUTE_URL = '/tree/{tree}/lifespans'; |
|
| 53 | 53 | |
| 54 | 54 | // In theory, only "@" is a safe separator, but it gives longer and uglier URLs. |
| 55 | 55 | // Unless some other application generates XREFs with a ".", we are safe. |
@@ -308,7 +308,7 @@ |
||
| 308 | 308 | $title = I18N::translate('Edit the story') . ' — ' . e($tree->title()); |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | - $individual = Registry::individualFactory()->make($xref, $tree); |
|
| 311 | + $individual = Registry::individualFactory()->make($xref, $tree); |
|
| 312 | 312 | |
| 313 | 313 | return $this->viewResponse('modules/stories/edit', [ |
| 314 | 314 | 'block_id' => $block_id, |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | use ModuleChartTrait; |
| 55 | 55 | use ModuleConfigTrait; |
| 56 | 56 | |
| 57 | - protected const ROUTE_URL = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}'; |
|
| 57 | + protected const ROUTE_URL = '/tree/{tree}/relationships-{ancestors}-{recursion}/{xref}{/xref2}'; |
|
| 58 | 58 | |
| 59 | 59 | /** It would be more correct to use PHP_INT_MAX, but this isn't friendly in URLs */ |
| 60 | 60 | public const UNLIMITED_RECURSION = 99; |
@@ -330,14 +330,14 @@ discard block |
||
| 330 | 330 | case 'sis': |
| 331 | 331 | case 'sib': |
| 332 | 332 | $table[$x + 1][$y] = '<div style="background:url(' . e(asset('css/images/hline.png')) . ') repeat-x center; width: 94px; text-align: center"><div class="hline-text" style="height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . view('icons/arrow-right') . '</div></div>'; |
| 333 | - $x += 2; |
|
| 333 | + $x += 2; |
|
| 334 | 334 | break; |
| 335 | 335 | case 'son': |
| 336 | 336 | case 'dau': |
| 337 | 337 | case 'chi': |
| 338 | 338 | if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) { |
| 339 | 339 | $table[$x + 1][$y - 1] = '<div style="background:url(' . $diagonal2 . '); width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: end;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . view('icons/arrow-down') . '</div></div>'; |
| 340 | - $x += 2; |
|
| 340 | + $x += 2; |
|
| 341 | 341 | } else { |
| 342 | 342 | $table[$x][$y - 1] = '<div style="background:url(' . e('"' . asset('css/images/vline.png') . '"') . ') repeat-y center; height: 64px; text-align: center;"><div class="vline-text" style="display: inline-block; width:50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . view('icons/arrow-down') . '</div></div>'; |
| 343 | 343 | } |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | case 'par': |
| 349 | 349 | if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) { |
| 350 | 350 | $table[$x + 1][$y + 1] = '<div style="background:url(' . $diagonal1 . '); background-position: top right; width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: start;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . view('icons/arrow-down') . '</div></div>'; |
| 351 | - $x += 2; |
|
| 351 | + $x += 2; |
|
| 352 | 352 | } else { |
| 353 | 353 | $table[$x][$y + 1] = '<div style="background:url(' . e('"' . asset('css/images/vline.png') . '"') . ') repeat-y center; height: 64px; text-align:center; "><div class="vline-text" style="display: inline-block; width: 50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>'; |
| 354 | 354 | } |
@@ -646,17 +646,17 @@ discard block |
||
| 646 | 646 | */ |
| 647 | 647 | private function oldStyleRelationshipPath(Tree $tree, array $path): array |
| 648 | 648 | { |
| 649 | - $spouse_codes = [ |
|
| 649 | + $spouse_codes = [ |
|
| 650 | 650 | 'M' => 'hus', |
| 651 | 651 | 'F' => 'wif', |
| 652 | 652 | 'U' => 'spo', |
| 653 | 653 | ]; |
| 654 | - $parent_codes = [ |
|
| 654 | + $parent_codes = [ |
|
| 655 | 655 | 'M' => 'fat', |
| 656 | 656 | 'F' => 'mot', |
| 657 | 657 | 'U' => 'par', |
| 658 | 658 | ]; |
| 659 | - $child_codes = [ |
|
| 659 | + $child_codes = [ |
|
| 660 | 660 | 'M' => 'son', |
| 661 | 661 | 'F' => 'dau', |
| 662 | 662 | 'U' => 'chi', |