Passed
Push — analysis-Xpb4ek ( 6c5a5c )
by Greg
12:14 queued 03:18
created
app/Http/Controllers/BranchesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $sosa = array_search($individual, $ancestors, true);
262 262
         if (is_int($sosa) && $module instanceof RelationshipsChartModule) {
263 263
             $sosa_class = 'search_hit';
264
-            $sosa_html = '<a class="details1 ' . $individual->getBoxStyle() . '" href="' . e($module->chartUrl($individual, ['xref2' => $individuals[1]->xref()])) . '" rel="nofollow" title="' . I18N::translate('Relationships') . '">' .  I18N::number($sosa) . '</a>' . self::sosaGeneration($sosa);
264
+            $sosa_html = '<a class="details1 ' . $individual->getBoxStyle() . '" href="' . e($module->chartUrl($individual, ['xref2' => $individuals[1]->xref()])) . '" rel="nofollow" title="' . I18N::translate('Relationships') . '">' . I18N::number($sosa) . '</a>' . self::sosaGeneration($sosa);
265 265
         } else {
266 266
             $sosa_class = '';
267 267
             $sosa_html  = '';
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                     $sosa = array_search($spouse, $ancestors, true);
298 298
                     if (is_int($sosa) && $module instanceof RelationshipsChartModule) {
299 299
                         $sosa_class = 'search_hit';
300
-                        $sosa_html  = '<a class="details1 ' . $spouse->getBoxStyle() . '" href="' . e($module->chartUrl($individual, ['xref2' => $individuals[1]->xref()])) . '" rel="nofollow" title="' . I18N::translate('Relationships') . '">' .  I18N::number($sosa) . '</a>' . self::sosaGeneration($sosa);
300
+                        $sosa_html  = '<a class="details1 ' . $spouse->getBoxStyle() . '" href="' . e($module->chartUrl($individual, ['xref2' => $individuals[1]->xref()])) . '" rel="nofollow" title="' . I18N::translate('Relationships') . '">' . I18N::number($sosa) . '</a>' . self::sosaGeneration($sosa);
301 301
                     } else {
302 302
                         $sosa_class = '';
303 303
                         $sosa_html  = '';
Please login to merge, or discard this patch.
app/Functions/FunctionsExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@
 block discarded – undo
103 103
         $record = GedcomRecord::getInstance('HEAD', $tree);
104 104
         $fact = $record->getFirstFact('COPR');
105 105
         if ($fact instanceof Fact) {
106
-            $COPR = "\n1 COPR " .$fact->value();
106
+            $COPR = "\n1 COPR " . $fact->value();
107 107
         }
108
-        $fact   = $record->getFirstFact('LANG');
108
+        $fact = $record->getFirstFact('LANG');
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')
Please login to merge, or discard this patch.
app/Census/CensusColumnNationality.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         }
53 53
 
54 54
         // Did we emigrate or naturalise?
55
-        foreach ($individual->facts(['IMMI' ,'EMIG', 'NATU'], true) as $fact) {
55
+        foreach ($individual->facts(['IMMI', 'EMIG', 'NATU'], true) as $fact) {
56 56
             if (Date::compare($fact->date(), $this->date()) <= 0) {
57 57
                 $place = $fact->place()->gedcomName();
58 58
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LocationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -519,7 +519,7 @@
 block discarded – undo
519 519
         // ... and process the differences
520 520
         $inserted = 0;
521 521
         if ($diff->isNotEmpty()) {
522
-            $nextRecordId    = 1 + (int) DB::table('placelocation')->max('pl_id');
522
+            $nextRecordId = 1 + (int) DB::table('placelocation')->max('pl_id');
523 523
 
524 524
             foreach ($diff as $place) {
525 525
                 // For Westminster, London, England, we must also create England and London, England
Please login to merge, or discard this patch.
app/Stats.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -734,11 +734,11 @@  discard block
 block discarded – undo
734 734
                 }
735 735
             }
736 736
             if ($types) {
737
-                $sql  .= ' AND d_fact IN (' . implode(', ', array_fill(0, count($types), '?')) . ')';
737
+                $sql .= ' AND d_fact IN (' . implode(', ', array_fill(0, count($types), '?')) . ')';
738 738
                 $vars = array_merge($vars, $types);
739 739
             }
740 740
         }
741
-        $sql  .= ' AND d_fact NOT IN (' . implode(', ', array_fill(0, count($no_types), '?')) . ')';
741
+        $sql .= ' AND d_fact NOT IN (' . implode(', ', array_fill(0, count($no_types), '?')) . ')';
742 742
         $vars = array_merge($vars, $no_types);
743 743
 
744 744
         $n = (int) Database::prepare($sql)->execute($vars)->fetchOne();
@@ -980,12 +980,12 @@  discard block
 block discarded – undo
980 980
         }
981 981
 
982 982
         if ($tot_u > 0) {
983
-            $chd         = $this->arrayToExtendedEncoding([
983
+            $chd = $this->arrayToExtendedEncoding([
984 984
                 intdiv(4095 * $tot_u, $tot),
985 985
                 intdiv(4095 * $tot_f, $tot),
986 986
                 intdiv(4095 * $tot_m, $tot),
987 987
             ]);
988
-            $chl         =
988
+            $chl =
989 989
                 I18N::translateContext('unknown people', 'Unknown') . ' - ' . $per_u . '|' .
990 990
                 I18N::translate('Females') . ' - ' . $per_f . '|' .
991 991
                 I18N::translate('Males') . ' - ' . $per_m;
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
             return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_unknown},{$color_female},{$color_male}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . '" title="' . $chart_title . '" />';
998 998
         }
999 999
 
1000
-        $chd         = $this->arrayToExtendedEncoding([
1000
+        $chd = $this->arrayToExtendedEncoding([
1001 1001
             intdiv(4095 * $tot_f, $tot),
1002 1002
             intdiv(4095 * $tot_m, $tot),
1003 1003
         ]);
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
             return '';
1113 1113
         }
1114 1114
 
1115
-        $chd         = $this->arrayToExtendedEncoding([
1115
+        $chd = $this->arrayToExtendedEncoding([
1116 1116
             intdiv(4095 * $tot_l, $tot),
1117 1117
             intdiv(4095 * $tot_d, $tot),
1118 1118
         ]);
@@ -1176,12 +1176,12 @@  discard block
 block discarded – undo
1176 1176
             if ($type == 'unknown') {
1177 1177
                 // There has to be a better way then this :(
1178 1178
                 foreach ($this->media_types as $t) {
1179
-                    $sql    .= " AND (m_gedcom NOT LIKE ? AND m_gedcom NOT LIKE ?)";
1179
+                    $sql .= " AND (m_gedcom NOT LIKE ? AND m_gedcom NOT LIKE ?)";
1180 1180
                     $vars[] = "%3 TYPE {$t}%";
1181 1181
                     $vars[] = "%1 _TYPE {$t}%";
1182 1182
                 }
1183 1183
             } else {
1184
-                $sql    .= " AND (m_gedcom LIKE ? OR m_gedcom LIKE ?)";
1184
+                $sql .= " AND (m_gedcom LIKE ? OR m_gedcom LIKE ?)";
1185 1185
                 $vars[] = "%3 TYPE {$type}%";
1186 1186
                 $vars[] = "%1 _TYPE {$type}%";
1187 1187
             }
@@ -2001,7 +2001,7 @@  discard block
 block discarded – undo
2001 2001
             $tot   = 0;
2002 2002
             foreach ($rows as $values) {
2003 2003
                 $values->total = (int) $values->total;
2004
-                $tot           += $values->total;
2004
+                $tot += $values->total;
2005 2005
             }
2006 2006
             // Beware divide by zero
2007 2007
             if ($tot == 0) {
@@ -2010,7 +2010,7 @@  discard block
 block discarded – undo
2010 2010
             $centuries = '';
2011 2011
             $counts    = [];
2012 2012
             foreach ($rows as $values) {
2013
-                $counts[]  = intdiv(100 * $values->total, $tot);
2013
+                $counts[] = intdiv(100 * $values->total, $tot);
2014 2014
                 $centuries .= $this->centuryName($values->century) . ' - ' . I18N::number($values->total) . '|';
2015 2015
             }
2016 2016
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -2087,7 +2087,7 @@  discard block
 block discarded – undo
2087 2087
             $tot   = 0;
2088 2088
             foreach ($rows as $values) {
2089 2089
                 $values->total = (int) $values->total;
2090
-                $tot           += $values->total;
2090
+                $tot += $values->total;
2091 2091
             }
2092 2092
             // Beware divide by zero
2093 2093
             if ($tot == 0) {
@@ -2096,7 +2096,7 @@  discard block
 block discarded – undo
2096 2096
             $centuries = '';
2097 2097
             $counts    = [];
2098 2098
             foreach ($rows as $values) {
2099
-                $counts[]  = intdiv(100 * $values->total, $tot);
2099
+                $counts[] = intdiv(100 * $values->total, $tot);
2100 2100
                 $centuries .= $this->centuryName($values->century) . ' - ' . I18N::number($values->total) . '|';
2101 2101
             }
2102 2102
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -2475,7 +2475,7 @@  discard block
 block discarded – undo
2475 2475
             $sex_search = '';
2476 2476
         }
2477 2477
 
2478
-        $rows  = $this->runSql(
2478
+        $rows = $this->runSql(
2479 2479
             "SELECT" .
2480 2480
             " birth.d_gid AS id," .
2481 2481
             " MIN(birth.d_julianday1) AS age" .
@@ -3332,7 +3332,7 @@  discard block
 block discarded – undo
3332 3332
             " GROUP BY family" .
3333 3333
             " ORDER BY age {$age_dir}"
3334 3334
         );
3335
-        $rows  = [];
3335
+        $rows = [];
3336 3336
         foreach ($drows as $family) {
3337 3337
             $rows[$family->family] = $family->age;
3338 3338
         }
@@ -3644,7 +3644,7 @@  discard block
 block discarded – undo
3644 3644
 
3645 3645
             foreach ($rows as $values) {
3646 3646
                 $values->total = (int) $values->total;
3647
-                $tot           += (int) $values->total;
3647
+                $tot += (int) $values->total;
3648 3648
             }
3649 3649
             // Beware divide by zero
3650 3650
             if ($tot === 0) {
@@ -3653,7 +3653,7 @@  discard block
 block discarded – undo
3653 3653
             $centuries = '';
3654 3654
             $counts    = [];
3655 3655
             foreach ($rows as $values) {
3656
-                $counts[]  = intdiv(100 * $values->total, $tot);
3656
+                $counts[] = intdiv(100 * $values->total, $tot);
3657 3657
                 $centuries .= $this->centuryName($values->century) . ' - ' . I18N::number($values->total) . '|';
3658 3658
             }
3659 3659
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -3732,7 +3732,7 @@  discard block
 block discarded – undo
3732 3732
             $tot   = 0;
3733 3733
             foreach ($rows as $values) {
3734 3734
                 $values->total = (int) $values->total;
3735
-                $tot           += $values->total;
3735
+                $tot += $values->total;
3736 3736
             }
3737 3737
             // Beware divide by zero
3738 3738
             if ($tot === 0) {
@@ -3741,7 +3741,7 @@  discard block
 block discarded – undo
3741 3741
             $centuries = '';
3742 3742
             $counts    = [];
3743 3743
             foreach ($rows as $values) {
3744
-                $counts[]  = intdiv(100 * $values->total, $tot);
3744
+                $counts[] = intdiv(100 * $values->total, $tot);
3745 3745
                 $centuries .= $this->centuryName($values->century) . ' - ' . I18N::number($values->total) . '|';
3746 3746
             }
3747 3747
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -4011,7 +4011,7 @@  discard block
 block discarded – undo
4011 4011
                 if ($sizes[0] < 1000) {
4012 4012
                     $sizes[0] += 50;
4013 4013
                 }
4014
-                $chxl    .= $this->centuryName($century) . '|';
4014
+                $chxl .= $this->centuryName($century) . '|';
4015 4015
                 $average = 0;
4016 4016
                 if (isset($values['F'])) {
4017 4017
                     if ($max <= 50) {
@@ -4730,7 +4730,7 @@  discard block
 block discarded – undo
4730 4730
             if ($type == 'list') {
4731 4731
                 if ($one && !in_array($fam->family, $dist)) {
4732 4732
                     if ($child1->canShow() && $child2->canShow()) {
4733
-                        $return  = '<li>';
4733
+                        $return = '<li>';
4734 4734
                         $return  .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
4735 4735
                         $return  .= I18N::translate('and') . ' ';
4736 4736
                         $return  .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
@@ -4741,7 +4741,7 @@  discard block
 block discarded – undo
4741 4741
                         $dist[]  = $fam->family;
4742 4742
                     }
4743 4743
                 } elseif (!$one && $child1->canShow() && $child2->canShow()) {
4744
-                    $return  = '<li>';
4744
+                    $return = '<li>';
4745 4745
                     $return  .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
4746 4746
                     $return  .= I18N::translate('and') . ' ';
4747 4747
                     $return  .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
@@ -4936,7 +4936,7 @@  discard block
 block discarded – undo
4936 4936
         $tot = 0;
4937 4937
         foreach ($rows as $row) {
4938 4938
             $row->tot = (int) $row->tot;
4939
-            $tot      += $row->tot;
4939
+            $tot += $row->tot;
4940 4940
         }
4941 4941
         $chd = '';
4942 4942
         $chl = [];
@@ -4948,7 +4948,7 @@  discard block
 block discarded – undo
4948 4948
                 } else {
4949 4949
                     $per = intdiv(100 * $row->tot, $tot);
4950 4950
                 }
4951
-                $chd   .= $this->arrayToExtendedEncoding([$per]);
4951
+                $chd .= $this->arrayToExtendedEncoding([$per]);
4952 4952
                 $chl[] = htmlspecialchars_decode(strip_tags($family->getFullName())) . ' - ' . I18N::number($row->tot);
4953 4953
             }
4954 4954
         }
@@ -5604,7 +5604,7 @@  discard block
 block discarded – undo
5604 5604
             $max_name  = 0;
5605 5605
             $top_name  = '';
5606 5606
             foreach ($surns as $spfxsurn => $count) {
5607
-                $per       = $count;
5607
+                $per = $count;
5608 5608
                 $count_per += $per;
5609 5609
                 // select most common surname from all variants
5610 5610
                 if ($per > $max_name) {
@@ -5628,11 +5628,11 @@  discard block
 block discarded – undo
5628 5628
                     ], $top_name);
5629 5629
             }
5630 5630
             $per   = intdiv(100 * $count_per, $tot_indi);
5631
-            $chd   .= $this->arrayToExtendedEncoding([$per]);
5631
+            $chd .= $this->arrayToExtendedEncoding([$per]);
5632 5632
             $chl[] = $top_name . ' - ' . I18N::number($count_per);
5633 5633
         }
5634 5634
         $per   = intdiv(100 * ($tot_indi - $tot), $tot_indi);
5635
-        $chd   .= $this->arrayToExtendedEncoding([$per]);
5635
+        $chd .= $this->arrayToExtendedEncoding([$per]);
5636 5636
         $chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
5637 5637
 
5638 5638
         $chart_title = implode(I18N::$list_separator, $chl);
@@ -6029,11 +6029,11 @@  discard block
 block discarded – undo
6029 6029
             } else {
6030 6030
                 $per = intdiv(100 * $count, $tot_indi);
6031 6031
             }
6032
-            $chd   .= $this->arrayToExtendedEncoding([$per]);
6032
+            $chd .= $this->arrayToExtendedEncoding([$per]);
6033 6033
             $chl[] = $givn . ' - ' . I18N::number($count);
6034 6034
         }
6035 6035
         $per   = intdiv(100 * ($tot_indi - $tot), $tot_indi);
6036
-        $chd   .= $this->arrayToExtendedEncoding([$per]);
6036
+        $chd .= $this->arrayToExtendedEncoding([$per]);
6037 6037
         $chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
6038 6038
 
6039 6039
         $chart_title = implode(I18N::$list_separator, $chl);
Please login to merge, or discard this patch.