Completed
Pull Request — master (#3643)
by
unknown
06:33
created
app/Functions/FunctionsPrint.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                     if ($note->canShow()) {
173 173
                         $noterec = $note->gedcom();
174 174
                         $nt      = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
175
-                        $data    .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
175
+                        $data .= self::printNoteRecord($tree, $nt > 0 ? $n1match[1] : '', 1, $noterec);
176 176
                     }
177 177
                 } else {
178 178
                     $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>';
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                         }
273 273
                     },
274 274
                     $age_string
275
-                ) ;
275
+                );
276 276
         }
277 277
     }
278 278
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                     $ageText = '';
337 337
                     if ($fact === 'DEAT' || Date::compare($date, $death_date) <= 0 || !$record->isDead()) {
338 338
                         // Before death, print age
339
-                        $age = (new Age($birth_date, $date))->ageAtEvent(false,$record->sex());
339
+                        $age = (new Age($birth_date, $date))->ageAtEvent(false, $record->sex());
340 340
                         // Only show calculated age if it differs from recorded age
341 341
                         if ($age !== '') {
342 342
                             if ($fact_age !== '' && $fact_age !== $age) {
@@ -406,20 +406,20 @@  discard block
 block discarded – undo
406 406
                 if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) {
407 407
                     foreach ($matches[1] as $match) {
408 408
                         $wt_place = new Place($match, $tree);
409
-                        $html     .= ' - ' . $wt_place->fullName();
409
+                        $html .= ' - ' . $wt_place->fullName();
410 410
                     }
411 411
                 }
412 412
                 $map_lati = '';
413 413
                 $cts      = preg_match('/\d LATI (.*)/', $placerec, $match);
414 414
                 if ($cts > 0) {
415 415
                     $map_lati = $match[1];
416
-                    $html     .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
416
+                    $html .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
417 417
                 }
418 418
                 $map_long = '';
419 419
                 $cts      = preg_match('/\d LONG (.*)/', $placerec, $match);
420 420
                 if ($cts > 0) {
421 421
                     $map_long = $match[1];
422
-                    $html     .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
422
+                    $html .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
423 423
                 }
424 424
                 if ($map_lati && $map_long) {
425 425
                     $map_lati = trim(strtr($map_lati, 'NSEW,�', ' - -. ')); // S5,6789 ==> -5.6789
Please login to merge, or discard this patch.
app/Http/RequestHandlers/IndividualPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,11 +111,11 @@
 block discarded – undo
111 111
 
112 112
         if ($individual->isDead()) {
113 113
             // If dead, show age at death
114
-            $age = (new Age($bdate, $ddate))->ageAtEvent(false,$individual->sex());
114
+            $age = (new Age($bdate, $ddate))->ageAtEvent(false, $individual->sex());
115 115
         } else {
116 116
             // If living, show age today
117 117
             $today = strtoupper(date('d M Y'));
118
-            $age   = (new Age($bdate, new Date($today)))->ageAtEvent(true,$individual->sex());
118
+            $age   = (new Age($bdate, new Date($today)))->ageAtEvent(true, $individual->sex());
119 119
         }
120 120
 
121 121
         // What images are linked to this individual
Please login to merge, or discard this patch.
app/Functions/FunctionsPrintFacts.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -531,14 +531,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
app/Http/RequestHandlers/TreePreferencesAction.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Schema/SeedGedcomSettingTable.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.