Completed
Pull Request — master (#1904)
by Rico
07:48
created
app/Place.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
      */
192 192
     public function getShortName()
193 193
     {
194
-        $SHOW_PEDIGREE_PLACES = (int)$this->tree->getPreference('SHOW_PEDIGREE_PLACES');
194
+        $SHOW_PEDIGREE_PLACES = (int) $this->tree->getPreference('SHOW_PEDIGREE_PLACES');
195 195
 
196 196
         if ($SHOW_PEDIGREE_PLACES >= count($this->gedcom_place)) {
197 197
             // A short place name - no need to abbreviate
Please login to merge, or discard this patch.
app/Functions/FunctionsPrint.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     if ($note->canShow()) {
140 140
                         $noterec = $note->getGedcom();
141 141
                         $nt      = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
142
-                        $data    .= self::printNoteRecord($tree, ($nt > 0) ? $n1match[1] : '', 1, $noterec);
142
+                        $data .= self::printNoteRecord($tree, ($nt > 0) ? $n1match[1] : '', 1, $noterec);
143 143
                     }
144 144
                 } else {
145 145
                     $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>';
@@ -385,35 +385,35 @@  discard block
 block discarded – undo
385 385
                 if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) {
386 386
                     foreach ($matches[1] as $match) {
387 387
                         $wt_place = new Place($match, $tree);
388
-                        $html     .= ' - ' . $wt_place->getFullName();
388
+                        $html .= ' - ' . $wt_place->getFullName();
389 389
                     }
390 390
                 }
391 391
                 $map_lati = '';
392 392
                 $cts      = preg_match('/\d LATI (.*)/', $placerec, $match);
393 393
                 if ($cts > 0) {
394 394
                     $map_lati = $match[1];
395
-                    $html     .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
395
+                    $html .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
396 396
                 }
397 397
                 $map_long = '';
398 398
                 $cts      = preg_match('/\d LONG (.*)/', $placerec, $match);
399 399
                 if ($cts > 0) {
400 400
                     $map_long = $match[1];
401
-                    $html     .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
401
+                    $html .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
402 402
                 }
403 403
                 if ($map_lati && $map_long) {
404 404
                     $map_lati = trim(strtr($map_lati, 'NSEW,�', ' - -. ')); // S5,6789 ==> -5.6789
405 405
                     $map_long = trim(strtr($map_long, 'NSEW,�', ' - -. ')); // E3.456� ==> 3.456
406
-                    $html     .= FontAwesome::linkIcon('google-maps', I18N::translate('Google Maps™'), [
406
+                    $html .= FontAwesome::linkIcon('google-maps', I18N::translate('Google Maps™'), [
407 407
                         'class' => 'btn btn-link',
408 408
                         'url'   => 'https://maps.google.com/maps?q=' . $map_lati . ',' . $map_long,
409 409
                         'rel'   => 'nofollow',
410 410
                     ]);
411
-                    $html     .= FontAwesome::linkIcon('bing-maps', I18N::translate('Bing Maps™'), [
411
+                    $html .= FontAwesome::linkIcon('bing-maps', I18N::translate('Bing Maps™'), [
412 412
                         'class' => 'btn btn-link',
413 413
                         'url'   => 'https://www.bing.com/maps/?lvl=15&cp=' . $map_lati . '~' . $map_long,
414 414
                         'rel'   => 'nofollow',
415 415
                     ]);
416
-                    $html     .= FontAwesome::linkIcon('openstreetmap', I18N::translate('OpenStreetMap™'), [
416
+                    $html .= FontAwesome::linkIcon('openstreetmap', I18N::translate('OpenStreetMap™'), [
417 417
                         'class' => 'btn btn-link',
418 418
                         'url'   => 'https://www.openstreetmap.org/#map=15/' . $map_lati . '/' . $map_long,
419 419
                         'rel'   => 'nofollow',
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -345,10 +345,10 @@
 block discarded – undo
345 345
         }
346 346
         // print gedcom ages
347 347
         foreach ([
348
-             I18N::translate('Age')     => $fact_age,
349
-             I18N::translate('Husband') => $husb_age,
350
-             I18N::translate('Wife')    => $wife_age,
351
-         ] as $label => $age) {
348
+                I18N::translate('Age')     => $fact_age,
349
+                I18N::translate('Husband') => $husb_age,
350
+                I18N::translate('Wife')    => $wife_age,
351
+            ] as $label => $age) {
352 352
             if ($age != '') {
353 353
                 $html .= ' <span class="label">' . $label . ':</span> <span class="age">' . FunctionsDate::getAgeAtEvent($age) . '</span>';
354 354
             }
Please login to merge, or discard this patch.
app/Functions/FunctionsEdit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
         if ($islink) {
526 526
             $value = trim($value, '@');
527 527
         } else {
528
-            $value = (string)substr($tag, strlen($fact) + 3);
528
+            $value = (string) substr($tag, strlen($fact) + 3);
529 529
         }
530 530
         if ($fact === 'REPO' || $fact === 'SOUR' || $fact === 'OBJE' || $fact === 'FAMC') {
531 531
             $islink = true;
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
             $html .= '<p class="small text-muted">' . I18N::translate('Use this image for charts and on the individual’s page.') . '</p>';
814 814
         } elseif ($fact === 'TYPE' && $level === '3') {
815 815
             //-- Build the selector for the Media 'TYPE' Fact
816
-            $html          .= '<select name="text[]"><option selected value="" ></option>';
816
+            $html .= '<select name="text[]"><option selected value="" ></option>';
817 817
             $selectedValue = strtolower($value);
818 818
             if (!array_key_exists($selectedValue, GedcomTag::getFileFormTypes())) {
819 819
                 $html .= '<option selected value="' . e($value) . '" >' . e($value) . '</option>';
Please login to merge, or discard this patch.
app/Functions/Functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -307,17 +307,17 @@
 block discarded – undo
307 307
             return false;
308 308
         }
309 309
 
310
-        $spouse_codes  = [
310
+        $spouse_codes = [
311 311
             'M' => 'hus',
312 312
             'F' => 'wif',
313 313
             'U' => 'spo',
314 314
         ];
315
-        $parent_codes  = [
315
+        $parent_codes = [
316 316
             'M' => 'fat',
317 317
             'F' => 'mot',
318 318
             'U' => 'par',
319 319
         ];
320
-        $child_codes   = [
320
+        $child_codes = [
321 321
             'M' => 'son',
322 322
             'F' => 'dau',
323 323
             'U' => 'chi',
Please login to merge, or discard this patch.
app/Functions/FunctionsExport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                         break;
65 65
                     }
66 66
                     $newrec .= mb_substr($line, 0, $pos) . Gedcom::EOL;
67
-                    $line   = $level . ' CONC ' . mb_substr($line, $pos);
67
+                    $line = $level . ' CONC ' . mb_substr($line, $pos);
68 68
                 } while (mb_strlen($line) > Gedcom::LINE_LENGTH);
69 69
             }
70 70
             $newrec .= $line . Gedcom::EOL;
Please login to merge, or discard this patch.
app/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
                     $attrs .= ' ' . $key . '="' . e($value) . '"';
70 70
                 }
71 71
 
72
-                $class    = trim('dropdown-item ' . $submenu->class);
72
+                $class = trim('dropdown-item ' . $submenu->class);
73 73
                 $submenus .= '<a class="' . $class . '" href="' . e($submenu->link) . '"' . $attrs . '>' . $submenu->label . '</a>';
74 74
             }
75 75
 
Please login to merge, or discard this patch.
app/Family.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
     {
281 281
         $nchi = count($this->getChildren());
282 282
         foreach ($this->getFacts('NCHI') as $fact) {
283
-            $nchi = max($nchi, (int)$fact->getValue());
283
+            $nchi = max($nchi, (int) $fact->getValue());
284 284
         }
285 285
 
286 286
         return $nchi;
Please login to merge, or discard this patch.
app/Schema/Migration22.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                     $_tmp_dir   = $WT_DATA_DIR;
61 61
                     while (strpos($_mf_dir, $_tmp_dir) !== 0) {
62 62
                         $_media_dir .= '../';
63
-                        $_tmp_dir   = preg_replace('~[^/\\\\]+[/\\\\]$~', '', $_tmp_dir);
63
+                        $_tmp_dir = preg_replace('~[^/\\\\]+[/\\\\]$~', '', $_tmp_dir);
64 64
                         if ($_tmp_dir == '') {
65 65
                             // Shouldn't get here - but this script is not allowed to fail...
66 66
                             continue 2;
Please login to merge, or discard this patch.
app/Location.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
         if ($tmp !== null) {
48 48
             $this->record = $tmp;
49 49
         } elseif (!empty($record)) {
50
-            $this->record = (object)$record;
50
+            $this->record = (object) $record;
51 51
         } else {
52
-            $this->record = (object)[
52
+            $this->record = (object) [
53 53
                 'fqpn'         => '',
54 54
                 'pl_id'        => 0,
55 55
                 'pl_parent_id' => 0,
@@ -81,12 +81,11 @@  discard block
 block discarded – undo
81 81
         switch ($format) {
82 82
             case 'signed':
83 83
                 return $this->record->pl_lati ?
84
-                    (float)strtr($this->record->pl_lati, [
84
+                    (float) strtr($this->record->pl_lati, [
85 85
                         'N' => '',
86 86
                         'S' => '-',
87 87
                         ',' => '.',
88
-                    ]) :
89
-                    $this->record->pl_lati;
88
+                    ]) : $this->record->pl_lati;
90 89
             default:
91 90
                 return $this->record->pl_lati;
92 91
         }
@@ -102,12 +101,11 @@  discard block
 block discarded – undo
102 101
         switch ($format) {
103 102
             case 'signed':
104 103
                 return $this->record->pl_long ?
105
-                    (float)strtr($this->record->pl_long, [
104
+                    (float) strtr($this->record->pl_long, [
106 105
                         'E' => '',
107 106
                         'W' => '-',
108 107
                         ',' => '.',
109
-                    ]) :
110
-                    $this->record->pl_long;
108
+                    ]) : $this->record->pl_long;
111 109
             default:
112 110
                 return $this->record->pl_long;
113 111
         }
Please login to merge, or discard this patch.