@@ -85,7 +85,7 @@ |
||
| 85 | 85 | * |
| 86 | 86 | * @return Submission |
| 87 | 87 | */ |
| 88 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Submission |
|
| 88 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Submission |
|
| 89 | 89 | { |
| 90 | 90 | return new Submission($xref, $gedcom, $pending, $tree); |
| 91 | 91 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if ($note->canShow()) { |
| 160 | 160 | $noterec = $note->gedcom(); |
| 161 | 161 | $nt = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match); |
| 162 | - $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec); |
|
| 162 | + $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec); |
|
| 163 | 163 | } |
| 164 | 164 | } else { |
| 165 | 165 | $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>'; |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | } |
| 260 | 260 | }, |
| 261 | 261 | $age_string |
| 262 | - ) ; |
|
| 262 | + ); |
|
| 263 | 263 | } |
| 264 | 264 | } |
| 265 | 265 | |
@@ -393,20 +393,20 @@ discard block |
||
| 393 | 393 | if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) { |
| 394 | 394 | foreach ($matches[1] as $match) { |
| 395 | 395 | $wt_place = new Place($match, $tree); |
| 396 | - $html .= ' - ' . $wt_place->fullName(); |
|
| 396 | + $html .= ' - ' . $wt_place->fullName(); |
|
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | $map_lati = ''; |
| 400 | 400 | $cts = preg_match('/\d LATI (.*)/', $placerec, $match); |
| 401 | 401 | if ($cts > 0) { |
| 402 | 402 | $map_lati = $match[1]; |
| 403 | - $html .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati; |
|
| 403 | + $html .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati; |
|
| 404 | 404 | } |
| 405 | 405 | $map_long = ''; |
| 406 | 406 | $cts = preg_match('/\d LONG (.*)/', $placerec, $match); |
| 407 | 407 | if ($cts > 0) { |
| 408 | 408 | $map_long = $match[1]; |
| 409 | - $html .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long; |
|
| 409 | + $html .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long; |
|
| 410 | 410 | } |
| 411 | 411 | if ($map_lati && $map_long) { |
| 412 | 412 | $map_lati = trim(strtr($map_lati, 'NSEW,�', ' - -. ')); // S5,6789 ==> -5.6789 |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | if (error_get_last() !== null && error_get_last()['type'] & E_ERROR) { |
| 83 | 83 | // If PHP does not display the error, then we must display it. |
| 84 | 84 | if (ini_get('display_errors') !== '1') { |
| 85 | - echo error_get_last()['message'], '<br><br>', error_get_last()['file'] , ': ', error_get_last()['line']; |
|
| 85 | + echo error_get_last()['message'], '<br><br>', error_get_last()['file'], ': ', error_get_last()['line']; |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | }); |
@@ -59,6 +59,6 @@ |
||
| 59 | 59 | * |
| 60 | 60 | * @return Submission |
| 61 | 61 | */ |
| 62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Submission; |
|
| 62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Submission; |
|
| 63 | 63 | |
| 64 | 64 | } |
@@ -59,5 +59,5 @@ |
||
| 59 | 59 | * |
| 60 | 60 | * @return Header |
| 61 | 61 | */ |
| 62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Header; |
|
| 62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Header; |
|
| 63 | 63 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * |
| 51 | 51 | * @return GedcomRecord |
| 52 | 52 | */ |
| 53 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): GedcomRecord; |
|
| 53 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : GedcomRecord; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Create a GedcomRecord object from a row in the database. |
@@ -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 = Factory::gedcomRecord()->make($match[1], $tree); |
| 117 | 117 | |
| 118 | 118 | return $record ? '<a href="' . e($record->url()) . '">' . $match[0] . '</a>' : $match[0]; |
@@ -308,7 +308,7 @@ |
||
| 308 | 308 | $title = I18N::translate('Edit the story') . ' — ' . e($tree->title()); |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | - $individual = Factory::individual()->make($xref, $tree); |
|
| 311 | + $individual = Factory::individual()->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; |
@@ -332,14 +332,14 @@ discard block |
||
| 332 | 332 | case 'sis': |
| 333 | 333 | case 'sib': |
| 334 | 334 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . view('icons/arrow-right') . '</div></div>'; |
| 335 | - $x += 2; |
|
| 335 | + $x += 2; |
|
| 336 | 336 | break; |
| 337 | 337 | case 'son': |
| 338 | 338 | case 'dau': |
| 339 | 339 | case 'chi': |
| 340 | 340 | if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) { |
| 341 | 341 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . view('icons/arrow-down') . '</div></div>'; |
| 342 | - $x += 2; |
|
| 342 | + $x += 2; |
|
| 343 | 343 | } else { |
| 344 | 344 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . view('icons/arrow-down') . '</div></div>'; |
| 345 | 345 | } |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | case 'par': |
| 351 | 351 | if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) { |
| 352 | 352 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . view('icons/arrow-down') . '</div></div>'; |
| 353 | - $x += 2; |
|
| 353 | + $x += 2; |
|
| 354 | 354 | } else { |
| 355 | 355 | $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], Factory::individual()->make($path[$n - 1], $tree), Factory::individual()->make($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . view('icons/arrow-up') . '</div></div>'; |
| 356 | 356 | } |
@@ -648,17 +648,17 @@ discard block |
||
| 648 | 648 | */ |
| 649 | 649 | private function oldStyleRelationshipPath(Tree $tree, array $path): array |
| 650 | 650 | { |
| 651 | - $spouse_codes = [ |
|
| 651 | + $spouse_codes = [ |
|
| 652 | 652 | 'M' => 'hus', |
| 653 | 653 | 'F' => 'wif', |
| 654 | 654 | 'U' => 'spo', |
| 655 | 655 | ]; |
| 656 | - $parent_codes = [ |
|
| 656 | + $parent_codes = [ |
|
| 657 | 657 | 'M' => 'fat', |
| 658 | 658 | 'F' => 'mot', |
| 659 | 659 | 'U' => 'par', |
| 660 | 660 | ]; |
| 661 | - $child_codes = [ |
|
| 661 | + $child_codes = [ |
|
| 662 | 662 | 'M' => 'son', |
| 663 | 663 | 'F' => 'dau', |
| 664 | 664 | 'U' => 'chi', |