@@ -531,14 +531,14 @@ discard block |
||
531 | 531 | } |
532 | 532 | |
533 | 533 | // Compute age of associated Person at the event (Person BIRT is mandatory ) |
534 | - $ageOfAssociated =""; |
|
534 | + $ageOfAssociated = ""; |
|
535 | 535 | if (preg_match('/\n2 DATE (.+)/', $event->gedcom(), $match1)) { |
536 | 536 | if (preg_match('/\n1 BIRT/', $person->gedcom(), $match)) { |
537 | 537 | preg_match('/\n2 DATE (.+)/', $person->gedcom(), $match2); |
538 | 538 | $isLiving = !preg_match('/\n1 DEAT/', $person->gedcom(), $match3); |
539 | 539 | $dateEvent = new Date($match1[1]); |
540 | 540 | $dateAssoP = new Date($match2[1]); |
541 | - $ageOfAssociated = (new Age($dateAssoP, $dateEvent))->ageAtEvent($isLiving,$person->sex()); |
|
541 | + $ageOfAssociated = (new Age($dateAssoP, $dateEvent))->ageAtEvent($isLiving, $person->sex()); |
|
542 | 542 | } |
543 | 543 | } |
544 | 544 | $values = ['<a href="' . e($person->url()) . '">' . $person->fullName() . '<i> ' . $ageOfAssociated . '</i>' . '</a>']; |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | for ($j = 0; $j < $ct; $j++) { |
603 | 603 | if (!str_contains($match[$j][1], '@')) { |
604 | 604 | $source = e($match[$j][1] . preg_replace('/\n\d CONT ?/', "\n", $match[$j][2])); |
605 | - $data .= '<div class="fact_SOUR"><span class="label">' . I18N::translate('Source') . ':</span> <span class="field" dir="auto">' . Filter::formatText($source, $tree) . '</span></div>'; |
|
605 | + $data .= '<div class="fact_SOUR"><span class="label">' . I18N::translate('Source') . ':</span> <span class="field" dir="auto">' . Filter::formatText($source, $tree) . '</span></div>'; |
|
606 | 606 | } |
607 | 607 | } |
608 | 608 | // Find source for each fact |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | } |
621 | 621 | $srec = substr($factrec, $spos1, $spos2 - $spos1); |
622 | 622 | $lt = preg_match_all("/$nlevel \w+/", $srec, $matches); |
623 | - $data .= '<div class="fact_SOUR">'; |
|
623 | + $data .= '<div class="fact_SOUR">'; |
|
624 | 624 | $id = 'collapse-' . Uuid::uuid4()->toString(); |
625 | 625 | $expanded = (bool) $tree->getPreference('EXPAND_SOURCES'); |
626 | 626 | if ($lt > 0) { |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Edit the tree preferences. |
42 | 42 | */ |
43 | -class TreePreferencesAction implements RequestHandlerInterface |
|
44 | -{ |
|
43 | +class TreePreferencesAction implements RequestHandlerInterface |
|
44 | +{ |
|
45 | 45 | /** |
46 | 46 | * @param ServerRequestInterface $request |
47 | 47 | * |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | |
120 | 120 | $gedcom = $params['gedcom'] ?? ''; |
121 | 121 | |
122 | - if ($gedcom !== '' && $gedcom !== $tree->name()) { |
|
123 | - try { |
|
122 | + if ($gedcom !== '' && $gedcom !== $tree->name()) { |
|
123 | + try { |
|
124 | 124 | DB::table('gedcom') |
125 | 125 | ->where('gedcom_id', '=', $tree->id()) |
126 | 126 | ->update(['gedcom_name' => $gedcom]); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ->where('setting_name', '=', 'DEFAULT_GEDCOM') |
130 | 130 | ->where('setting_value', '=', $tree->name()) |
131 | 131 | ->update(['setting_value' => $gedcom]); |
132 | - } catch (Exception $ex) { |
|
132 | + } catch (Exception $ex) { |
|
133 | 133 | // Probably a duplicate name. |
134 | 134 | } |
135 | 135 | } |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | $all_trees = $params['all_trees'] ?? ''; |
141 | 141 | $new_trees = $params['new_trees'] ?? ''; |
142 | 142 | |
143 | - if ($all_trees === 'on') { |
|
143 | + if ($all_trees === 'on') { |
|
144 | 144 | FlashMessages::addMessage(I18N::translate('The preferences for all family trees have been updated.'), 'success'); |
145 | 145 | } |
146 | 146 | |
147 | - if ($new_trees === 'on') { |
|
147 | + if ($new_trees === 'on') { |
|
148 | 148 | FlashMessages::addMessage(I18N::translate('The preferences for new family trees have been updated.'), 'success'); |
149 | 149 | } |
150 | 150 |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Populate the gedcom_setting table |
28 | 28 | */ |
29 | -class SeedGedcomSettingTable implements SeedInterface |
|
30 | -{ |
|
29 | +class SeedGedcomSettingTable implements SeedInterface |
|
30 | +{ |
|
31 | 31 | private const DEFAULT_SETTINGS = [ |
32 | 32 | 'ADVANCED_NAME_FACTS' => 'NICK,_AKA', |
33 | 33 | 'ADVANCED_PLAC_FACTS' => '', |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | public function run(): void |
115 | 115 | { |
116 | 116 | // Set default settings for new trees |
117 | - foreach (self::DEFAULT_SETTINGS as $setting_name => $setting_value) { |
|
117 | + foreach (self::DEFAULT_SETTINGS as $setting_name => $setting_value) { |
|
118 | 118 | DB::table('gedcom_setting')->updateOrInsert([ |
119 | 119 | 'gedcom_id' => -1, |
120 | 120 | 'setting_name' => $setting_name, |