@@ -320,14 +320,14 @@ discard block |
||
320 | 320 | case 'sis': |
321 | 321 | case 'sib': |
322 | 322 | $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . view('icons/arrow-right') . '</div></div>'; |
323 | - $x += 2; |
|
323 | + $x += 2; |
|
324 | 324 | break; |
325 | 325 | case 'son': |
326 | 326 | case 'dau': |
327 | 327 | case 'chi': |
328 | 328 | if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) { |
329 | 329 | $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . view('icons/arrow-down') . '</div></div>'; |
330 | - $x += 2; |
|
330 | + $x += 2; |
|
331 | 331 | } else { |
332 | 332 | $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . view('icons/arrow-down') . '</div></div>'; |
333 | 333 | } |
@@ -338,9 +338,9 @@ discard block |
||
338 | 338 | case 'par': |
339 | 339 | if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) { |
340 | 340 | $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . view('icons/arrow-down') . '</div></div>'; |
341 | - $x += 2; |
|
341 | + $x += 2; |
|
342 | 342 | } else { |
343 | - $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>'; |
|
343 | + $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], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>'; |
|
344 | 344 | } |
345 | 345 | $y += 2; |
346 | 346 | break; |
@@ -478,17 +478,17 @@ discard block |
||
478 | 478 | */ |
479 | 479 | private function oldStyleRelationshipPath(Tree $tree, array $path): array |
480 | 480 | { |
481 | - $spouse_codes = [ |
|
481 | + $spouse_codes = [ |
|
482 | 482 | 'M' => 'hus', |
483 | 483 | 'F' => 'wif', |
484 | 484 | 'U' => 'spo', |
485 | 485 | ]; |
486 | - $parent_codes = [ |
|
486 | + $parent_codes = [ |
|
487 | 487 | 'M' => 'fat', |
488 | 488 | 'F' => 'mot', |
489 | 489 | 'U' => 'par', |
490 | 490 | ]; |
491 | - $child_codes = [ |
|
491 | + $child_codes = [ |
|
492 | 492 | 'M' => 'son', |
493 | 493 | 'F' => 'dau', |
494 | 494 | 'U' => 'chi', |
@@ -59,7 +59,7 @@ |
||
59 | 59 | ]; |
60 | 60 | |
61 | 61 | foreach ($given as $name => $count) { |
62 | - $data[] = [ $name, $count ]; |
|
62 | + $data[] = [$name, $count]; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $data[] = [ |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $tot_l |
58 | 58 | ]; |
59 | 59 | |
60 | - $data[] = [ |
|
60 | + $data[] = [ |
|
61 | 61 | I18N::translate('Dead'), |
62 | 62 | $tot_d |
63 | 63 | ]; |
@@ -102,9 +102,9 @@ |
||
102 | 102 | ->groupBy(['century', 'sex']); |
103 | 103 | |
104 | 104 | return $male->unionAll($female) |
105 | - ->orderBy('century') |
|
106 | - ->get() |
|
107 | - ->all(); |
|
105 | + ->orderBy('century') |
|
106 | + ->get() |
|
107 | + ->all(); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | |
963 | 963 | $data = [ |
964 | 964 | array_merge( |
965 | - [ I18N::translate('Century') ], |
|
965 | + [I18N::translate('Century')], |
|
966 | 966 | array_values($z_axis) |
967 | 967 | ) |
968 | 968 | ]; |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | |
980 | 980 | foreach ($intermediate as $key => $values) { |
981 | 981 | $data[] = array_merge( |
982 | - [ $x_axis[$key] ], |
|
982 | + [$x_axis[$key]], |
|
983 | 983 | $values |
984 | 984 | ); |
985 | 985 | } |
@@ -177,7 +177,7 @@ |
||
177 | 177 | |
178 | 178 | // Father’s ancestors link to the father’s pedigree |
179 | 179 | // Mother’s ancestors link to the mother’s pedigree.. |
180 | - $links = $ancestors->map(function (?Individual $individual, $sosa) use ($ancestors, $orientation, $generations): string { |
|
180 | + $links = $ancestors->map(function (?Individual $individual, $sosa) use ($ancestors, $orientation, $generations) : string { |
|
181 | 181 | if ($individual instanceof Individual && $sosa >= 2 ** $generations / 2 && !empty($individual->childFamilies())) { |
182 | 182 | // The last row/column, and there are more generations. |
183 | 183 | if ($sosa >= 2 ** $generations * 3 / 4) { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | echo '<td>'; |
260 | 260 | foreach ($person->childFamilies() as $cfamily) { |
261 | 261 | foreach ($cfamily->spouses() as $parent) { |
262 | - echo '<a href="' . e($this->chartUrl($parent, ['generations' => $generations])) . '" title="' . I18N::translate('Start at parents') . '">' . view('icons/arrow-up') . '<span class="sr-only">' . I18N::translate('Start at parents') . '</span></a>'; |
|
262 | + echo '<a href="' . e($this->chartUrl($parent, ['generations' => $generations])) . '" title="' . I18N::translate('Start at parents') . '">' . view('icons/arrow-up') . '<span class="sr-only">' . I18N::translate('Start at parents') . '</span></a>'; |
|
263 | 263 | // only show the arrow for one of the parents |
264 | 264 | break; |
265 | 265 | } |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | if ($spouse) { |
339 | 339 | foreach ($spouse->childFamilies() as $cfamily) { |
340 | 340 | foreach ($cfamily->spouses() as $parent) { |
341 | - echo '<a href="' . e($this->chartUrl($parent, ['generations' => $generations])) . '" title="' . strip_tags($this->chartTitle($parent)) . '">' . view('icons/arrow-up') . '<span class="sr-only">' . strip_tags($this->chartTitle($parent)) . '</span></a>'; |
|
341 | + echo '<a href="' . e($this->chartUrl($parent, ['generations' => $generations])) . '" title="' . strip_tags($this->chartTitle($parent)) . '">' . view('icons/arrow-up') . '<span class="sr-only">' . strip_tags($this->chartTitle($parent)) . '</span></a>'; |
|
342 | 342 | // only show the arrow for one of the parents |
343 | 343 | break; |
344 | 344 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | if ($kcount == 0) { |
292 | 292 | echo "</td><td style='width:", app()->make(ModuleThemeInterface::class)->parameter('chart-box-x'), "px'>"; |
293 | 293 | } else { |
294 | - echo '<a href="#" title="' . I18N::translate('Children') . '" data-route="Descendants" data-xref="' . e($pid) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($individual->tree()->name()) . '">' . view('icons/arrow-left') . '</a>'; |
|
294 | + echo '<a href="#" title="' . I18N::translate('Children') . '" data-route="Descendants" data-xref="' . e($pid) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($individual->tree()->name()) . '">' . view('icons/arrow-left') . '</a>'; |
|
295 | 295 | |
296 | 296 | //-- move the arrow up to line up with the correct box |
297 | 297 | if ($show_spouse) { |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | } |
373 | 373 | |
374 | 374 | // filter out root person from children array so only siblings remain |
375 | - $siblings = $family->children()->filter(function (Individual $x) use ($individual): bool { |
|
375 | + $siblings = $family->children()->filter(function (Individual $x) use ($individual): bool { |
|
376 | 376 | return $x !== $individual; |
377 | 377 | }); |
378 | 378 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | echo '<td id="td_' . e($ARID) . '">'; |
446 | 446 | |
447 | 447 | if ($generation == $generations - 1 && $family->husband()->childFamilies()) { |
448 | - echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->husband()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>'; |
|
448 | + echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->husband()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>'; |
|
449 | 449 | } |
450 | 450 | |
451 | 451 | $this->printPersonPedigree($family->husband(), $generation + 1, $generations, $show_spouse); |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | echo '<td id="td_' . e($ARID) . '">'; |
477 | 477 | |
478 | 478 | if ($generation == $generations - 1 && $family->wife()->childFamilies()) { |
479 | - echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->wife()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>'; |
|
479 | + echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->wife()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>'; |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | $this->printPersonPedigree($family->wife(), $generation + 1, $generations, $show_spouse); |
@@ -103,11 +103,11 @@ |
||
103 | 103 | $record = GedcomRecord::getInstance('HEAD', $tree); |
104 | 104 | $fact = $record->facts(['COPR'])->first(); |
105 | 105 | if ($fact instanceof Fact) { |
106 | - $COPR = "\n1 COPR " .$fact->value(); |
|
106 | + $COPR = "\n1 COPR " . $fact->value(); |
|
107 | 107 | } |
108 | - $fact = $record->facts(['LANG'])->first(); |
|
108 | + $fact = $record->facts(['LANG'])->first(); |
|
109 | 109 | if ($fact instanceof Fact) { |
110 | - $LANG = "\n1 LANG " .$fact->value(); |
|
110 | + $LANG = "\n1 LANG " . $fact->value(); |
|
111 | 111 | } |
112 | 112 | // Link to actual SUBM/SUBN records, if they exist |
113 | 113 | $subn = DB::table('other') |