Completed
Branch develop (b6db7c)
by Greg
09:30
created
app/Report/ReportHtmlFootnote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
                                     $newtext .= ' ';
139 139
                                 }
140 140
                             } else {
141
-                                $lw      = $html->getStringWidth($word . ' ');
141
+                                $lw = $html->getStringWidth($word . ' ');
142 142
                                 $newtext .= "\n$word";
143 143
                                 if ($addspace != 0) {
144 144
                                     $newtext .= ' ';
Please login to merge, or discard this patch.
app/Report/ReportHtmlText.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                     $lines = explode("\n", $temptext);
60 60
                     foreach ($lines as $line) {
61 61
                         echo '<div style="position:absolute;top:', $startY, 'pt;', $renderer->alignRTL, ':', $startX, 'pt;width:', $width, 'pt;">';
62
-                        $line   = $renderer->textWrap($line, $width);
62
+                        $line = $renderer->textWrap($line, $width);
63 63
                         $startY += $renderer->getTextCellHeight($line);
64 64
                         $renderer->setY($startY);
65 65
                         $renderer->write($line, $this->color);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                                     $newtext .= ' ';
147 147
                                 }
148 148
                             } else {
149
-                                $lw      = $html->getStringWidth($word . ' ');
149
+                                $lw = $html->getStringWidth($word . ' ');
150 150
                                 $newtext .= "\n$word";
151 151
                                 if ($addspace != 0) {
152 152
                                     $newtext .= ' ';
Please login to merge, or discard this patch.
app/Report/ReportPdfFootnote.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         if ($this->wrapWidthRemaining > 0) {
108 108
             // Check with line counter too!
109 109
             // but floor the $wrapWidthRemaining first to keep it bugfree!
110
-            $wrapWidthRemaining = (int)($this->wrapWidthRemaining);
110
+            $wrapWidthRemaining = (int) ($this->wrapWidthRemaining);
111 111
             if ($lw >= $wrapWidthRemaining || $lfct > 1) {
112 112
                 $newtext = '';
113 113
                 $lines   = explode("\n", $this->numText);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                                     $newtext .= ' ';
130 130
                                 }
131 131
                             } else {
132
-                                $lw      = $pdf->GetStringWidth($word . ' ');
132
+                                $lw = $pdf->GetStringWidth($word . ' ');
133 133
                                 $newtext .= "\n$word";
134 134
                                 if ($addspace != 0) {
135 135
                                     $newtext .= ' ';
Please login to merge, or discard this patch.
app/Report/ReportHtml.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $this->pageh = $tmpw;
146 146
         }
147 147
         // Store the pagewidth without margins
148
-        $this->noMarginWidth = (int)($this->pagew - $this->leftmargin - $this->rightmargin);
148
+        $this->noMarginWidth = (int) ($this->pagew - $this->leftmargin - $this->rightmargin);
149 149
         // If RTL
150 150
         if ($this->rtl) {
151 151
             $this->alignRTL  = 'right';
@@ -725,14 +725,14 @@  discard block
 block discarded – undo
725 725
     public function textWrap($str, $width)
726 726
     {
727 727
         // Calculate the line width
728
-        $lw = (int)($width / ($this->getCurrentStyleHeight() / 2));
728
+        $lw = (int) ($width / ($this->getCurrentStyleHeight() / 2));
729 729
         // Wordwrap each line
730 730
         $lines = explode("\n", $str);
731 731
         // Line Feed counter
732 732
         $lfct     = count($lines);
733 733
         $wraptext = '';
734 734
         foreach ($lines as $line) {
735
-            $wtext    = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true);
735
+            $wtext = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true);
736 736
             $wraptext .= $wtext;
737 737
             // Add a new line as long as it’s not the last line
738 738
             if ($lfct > 1) {
Please login to merge, or discard this patch.
app/Report/ReportPdfCell.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             '<u>',
44 44
             '</u>',
45 45
         ], $temptext);
46
-        $match    = [];
46
+        $match = [];
47 47
         // Indicates if the cell background must be painted (1) or transparent (0)
48 48
         if ($this->fill == 1) {
49 49
             if (!empty($this->bgcolor)) {
Please login to merge, or discard this patch.
app/Individual.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         // Dead people...
124 124
         if ($this->tree->getPreference('SHOW_DEAD_PEOPLE') >= $access_level && $this->isDead()) {
125 125
             $keep_alive             = false;
126
-            $KEEP_ALIVE_YEARS_BIRTH = (int)$this->tree->getPreference('KEEP_ALIVE_YEARS_BIRTH');
126
+            $KEEP_ALIVE_YEARS_BIRTH = (int) $this->tree->getPreference('KEEP_ALIVE_YEARS_BIRTH');
127 127
             if ($KEEP_ALIVE_YEARS_BIRTH) {
128 128
                 preg_match_all('/\n1 (?:' . WT_EVENTS_BIRT . ').*(?:\n[2-9].*)*(?:\n2 DATE (.+))/', $this->gedcom, $matches, PREG_SET_ORDER);
129 129
                 foreach ($matches as $match) {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     }
135 135
                 }
136 136
             }
137
-            $KEEP_ALIVE_YEARS_DEATH = (int)$this->tree->getPreference('KEEP_ALIVE_YEARS_DEATH');
137
+            $KEEP_ALIVE_YEARS_DEATH = (int) $this->tree->getPreference('KEEP_ALIVE_YEARS_DEATH');
138 138
             if ($KEEP_ALIVE_YEARS_DEATH) {
139 139
                 preg_match_all('/\n1 (?:' . WT_EVENTS_DEAT . ').*(?:\n[2-9].*)*(?:\n2 DATE (.+))/', $this->gedcom, $matches, PREG_SET_ORDER);
140 140
                 foreach ($matches as $match) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             }
151 151
         }
152 152
         // Consider relationship privacy (unless an admin is applying download restrictions)
153
-        $user_path_length = (int)$this->tree->getUserPreference(Auth::user(), 'RELATIONSHIP_PATH_LENGTH');
153
+        $user_path_length = (int) $this->tree->getUserPreference(Auth::user(), 'RELATIONSHIP_PATH_LENGTH');
154 154
         $gedcomid         = $this->tree->getUserPreference(Auth::user(), 'gedcomid');
155 155
         if ($gedcomid !== '' && $user_path_length > 0) {
156 156
             return self::isRelated($this, $user_path_length);
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public function isDead()
324 324
     {
325
-        $MAX_ALIVE_AGE = (int)$this->tree->getPreference('MAX_ALIVE_AGE');
325
+        $MAX_ALIVE_AGE = (int) $this->tree->getPreference('MAX_ALIVE_AGE');
326 326
 
327 327
         // "1 DEAT Y" or "1 DEAT/2 DATE" or "1 DEAT/2 PLAC"
328 328
         if (preg_match('/\n1 (?:' . WT_EVENTS_DEAT . ')(?: Y|(?:\n[2-9].+)*\n2 (DATE|PLAC) )/', $this->gedcom)) {
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                 if ($min && $max) {
712 712
                     $gregorian_calendar = new GregorianCalendar;
713 713
 
714
-                    list($year) = $gregorian_calendar->jdToYmd((int)((max($min) + min($max)) / 2));
714
+                    list($year) = $gregorian_calendar->jdToYmd((int) ((max($min) + min($max)) / 2));
715 715
                     $this->_getEstimatedBirthDate = new Date('EST ' . $year);
716 716
                 } else {
717 717
                     $this->_getEstimatedBirthDate = new Date(''); // always return a date object
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
             }
739 739
             if ($this->_getEstimatedDeathDate === null) {
740 740
                 if ($this->getEstimatedBirthDate()->minimumJulianDay()) {
741
-                    $max_alive_age                = (int)$this->tree->getPreference('MAX_ALIVE_AGE');
741
+                    $max_alive_age                = (int) $this->tree->getPreference('MAX_ALIVE_AGE');
742 742
                     $this->_getEstimatedDeathDate = $this->getEstimatedBirthDate()->addYears($max_alive_age, 'BEF');
743 743
                 } else {
744 744
                     $this->_getEstimatedDeathDate = new Date(''); // always return a date object
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
         if ($display) {
1112 1112
             $txt .= ' style="display:' . $display . '"';
1113 1113
         }
1114
-        $txt  .= '>';
1114
+        $txt .= '>';
1115 1115
         $husb = $fam->getHusband();
1116 1116
         if ($husb) {
1117 1117
             // Temporarily reset the 'prefered' display name, as we always
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
         // Extract the structured name parts - use for "sortable" names and indexes
1181 1181
         ////////////////////////////////////////////////////////////////////////////
1182 1182
 
1183
-        $sublevel = 1 + (int)$gedcom[0];
1183
+        $sublevel = 1 + (int) $gedcom[0];
1184 1184
         $NPFX     = preg_match("/\n{$sublevel} NPFX (.+)/", $gedcom, $match) ? $match[1] : '';
1185 1185
         $GIVN     = preg_match("/\n{$sublevel} GIVN (.+)/", $gedcom, $match) ? $match[1] : '';
1186 1186
         $SURN     = preg_match("/\n{$sublevel} SURN (.+)/", $gedcom, $match) ? $match[1] : '';
Please login to merge, or discard this patch.
app/Theme/AbstractTheme.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     {
209 209
         if ($analytics_id) {
210 210
             // Add extra dimensions (i.e. filtering categories)
211
-            $dimensions = (object)[
211
+            $dimensions = (object) [
212 212
                 'dimension1' => $this->tree ? $this->tree->getName() : '-',
213 213
                 'dimension2' => $this->tree ? Auth::accessLevel($this->tree) : '-',
214 214
             ];
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         if ($project_id && $security_id) {
271 271
             return
272 272
                 '<script>' .
273
-                'var sc_project=' . (int)$project_id . ',sc_invisible=1,sc_security="' . $security_id .
273
+                'var sc_project=' . (int) $project_id . ',sc_invisible=1,sc_security="' . $security_id .
274 274
                 '",scJsHost = (("https:"===document.location.protocol)?"https://secure.":"http://www.");' .
275 275
                 'document.write("<sc"+"ript src=\'"+scJsHost+"statcounter.com/counter/counter.js\'></"+"script>");' .
276 276
                 '</script>';
Please login to merge, or discard this patch.
app/Stats.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     private function getTags($text)
159 159
     {
160 160
         // Extract all tags from the provided text
161
-        preg_match_all('/#([^#]+)(?=#)/', (string)$text, $match);
161
+        preg_match_all('/#([^#]+)(?=#)/', (string) $text, $match);
162 162
         $tags       = $match[1];
163 163
         $c          = count($tags);
164 164
         $new_tags   = []; // tag to replace
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      */
400 400
     private function totalIndividualsQuery()
401 401
     {
402
-        return (int)Database::prepare(
402
+        return (int) Database::prepare(
403 403
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id"
404 404
         )->execute([
405 405
             'tree_id' => $this->tree->getTreeId(),
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      */
424 424
     private function totalIndisWithSourcesQuery()
425 425
     {
426
-        return (int)Database::prepare(
426
+        return (int) Database::prepare(
427 427
             "SELECT COUNT(DISTINCT i_id)" .
428 428
             " FROM `##individuals` JOIN `##link` ON i_id = l_from AND i_file = l_file" .
429 429
             " WHERE l_file = :tree_id AND l_type = 'SOUR'"
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
      */
507 507
     private function totalFamiliesQuery()
508 508
     {
509
-        return (int)Database::prepare(
509
+        return (int) Database::prepare(
510 510
             "SELECT COUNT(*) FROM `##families` WHERE f_file = :tree_id"
511 511
         )->execute([
512 512
             'tree_id' => $this->tree->getTreeId(),
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
      */
531 531
     private function totalFamsWithSourcesQuery()
532 532
     {
533
-        return (int)Database::prepare(
533
+        return (int) Database::prepare(
534 534
             "SELECT COUNT(DISTINCT f_id)" .
535 535
             " FROM `##families` JOIN `##link` ON f_id = l_from AND f_file = l_file" .
536 536
             " WHERE l_file = :tree_id AND l_type = 'SOUR'"
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
      */
614 614
     private function totalSourcesQuery()
615 615
     {
616
-        return (int)Database::prepare(
616
+        return (int) Database::prepare(
617 617
             "SELECT COUNT(*) FROM `##sources` WHERE s_file = :tree_id"
618 618
         )->execute([
619 619
             'tree_id' => $this->tree->getTreeId(),
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
      */
648 648
     private function totalNotesQuery()
649 649
     {
650
-        return (int)Database::prepare(
650
+        return (int) Database::prepare(
651 651
             "SELECT COUNT(*) FROM `##other` WHERE o_type='NOTE' AND o_file = :tree_id"
652 652
         )->execute([
653 653
             'tree_id' => $this->tree->getTreeId(),
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
      */
682 682
     private function totalRepositoriesQuery()
683 683
     {
684
-        return (int)Database::prepare(
684
+        return (int) Database::prepare(
685 685
             "SELECT COUNT(*) FROM `##other` WHERE o_type='REPO' AND o_file = :tree_id"
686 686
         )->execute([
687 687
             'tree_id' => $this->tree->getTreeId(),
@@ -790,11 +790,11 @@  discard block
 block discarded – undo
790 790
                 }
791 791
             }
792 792
             if ($types) {
793
-                $sql  .= ' AND d_fact IN (' . implode(', ', array_fill(0, count($types), '?')) . ')';
793
+                $sql .= ' AND d_fact IN (' . implode(', ', array_fill(0, count($types), '?')) . ')';
794 794
                 $vars = array_merge($vars, $types);
795 795
             }
796 796
         }
797
-        $sql  .= ' AND d_fact NOT IN (' . implode(', ', array_fill(0, count($no_types), '?')) . ')';
797
+        $sql .= ' AND d_fact NOT IN (' . implode(', ', array_fill(0, count($no_types), '?')) . ')';
798 798
         $vars = array_merge($vars, $no_types);
799 799
 
800 800
         return I18N::number(Database::prepare($sql)->execute($vars)->fetchOne());
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
      */
905 905
     private function totalSexMalesQuery()
906 906
     {
907
-        return (int)Database::prepare(
907
+        return (int) Database::prepare(
908 908
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'M'"
909 909
         )->execute([
910 910
             'tree_id' => $this->tree->getTreeId(),
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
      */
939 939
     private function totalSexFemalesQuery()
940 940
     {
941
-        return (int)Database::prepare(
941
+        return (int) Database::prepare(
942 942
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'F'"
943 943
         )->execute([
944 944
             'tree_id' => $this->tree->getTreeId(),
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
      */
973 973
     private function totalSexUnknownQuery()
974 974
     {
975
-        return (int)Database::prepare(
975
+        return (int) Database::prepare(
976 976
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'U'"
977 977
         )->execute([
978 978
             'tree_id' => $this->tree->getTreeId(),
@@ -1044,12 +1044,12 @@  discard block
 block discarded – undo
1044 1044
         if ($tot == 0) {
1045 1045
             return '';
1046 1046
         } elseif ($tot_u > 0) {
1047
-            $chd         = $this->arrayToExtendedEncoding([
1047
+            $chd = $this->arrayToExtendedEncoding([
1048 1048
                 4095 * $tot_u / $tot,
1049 1049
                 4095 * $tot_f / $tot,
1050 1050
                 4095 * $tot_m / $tot,
1051 1051
             ]);
1052
-            $chl         =
1052
+            $chl =
1053 1053
                 I18N::translateContext('unknown people', 'Unknown') . ' - ' . $per_u . '|' .
1054 1054
                 I18N::translate('Females') . ' - ' . $per_f . '|' .
1055 1055
                 I18N::translate('Males') . ' - ' . $per_m;
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
 
1061 1061
             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 . '" />';
1062 1062
         } else {
1063
-            $chd         = $this->arrayToExtendedEncoding([
1063
+            $chd = $this->arrayToExtendedEncoding([
1064 1064
                 4095 * $tot_f / $tot,
1065 1065
                 4095 * $tot_m / $tot,
1066 1066
             ]);
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
      */
1087 1087
     private function totalLivingQuery()
1088 1088
     {
1089
-        return (int)Database::prepare(
1089
+        return (int) Database::prepare(
1090 1090
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_gedcom NOT REGEXP '\\n1 (" . WT_EVENTS_DEAT . ")'"
1091 1091
         )->execute([
1092 1092
             'tree_id' => $this->tree->getTreeId(),
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
      */
1121 1121
     private function totalDeceasedQuery()
1122 1122
     {
1123
-        return (int)Database::prepare(
1123
+        return (int) Database::prepare(
1124 1124
             "SELECT COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_gedcom REGEXP '\\n1 (" . WT_EVENTS_DEAT . ")'"
1125 1125
         )->execute([
1126 1126
             'tree_id' => $this->tree->getTreeId(),
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
         if ($tot == 0) {
1186 1186
             return '';
1187 1187
         } else {
1188
-            $chd         = $this->arrayToExtendedEncoding([
1188
+            $chd = $this->arrayToExtendedEncoding([
1189 1189
                 4095 * $tot_l / $tot,
1190 1190
                 4095 * $tot_d / $tot,
1191 1191
             ]);
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
     public function totalUsers($params = [])
1210 1210
     {
1211 1211
         if (isset($params[0])) {
1212
-            $total = count(User::all()) + (int)$params[0];
1212
+            $total = count(User::all()) + (int) $params[0];
1213 1213
         } else {
1214 1214
             $total = count(User::all());
1215 1215
         }
@@ -1256,18 +1256,18 @@  discard block
 block discarded – undo
1256 1256
             if ($type == 'unknown') {
1257 1257
                 // There has to be a better way then this :(
1258 1258
                 foreach ($this->_media_types as $t) {
1259
-                    $sql    .= " AND (m_gedcom NOT LIKE ? AND m_gedcom NOT LIKE ?)";
1259
+                    $sql .= " AND (m_gedcom NOT LIKE ? AND m_gedcom NOT LIKE ?)";
1260 1260
                     $vars[] = "%3 TYPE {$t}%";
1261 1261
                     $vars[] = "%1 _TYPE {$t}%";
1262 1262
                 }
1263 1263
             } else {
1264
-                $sql    .= " AND (m_gedcom LIKE ? OR m_gedcom LIKE ?)";
1264
+                $sql .= " AND (m_gedcom LIKE ? OR m_gedcom LIKE ?)";
1265 1265
                 $vars[] = "%3 TYPE {$type}%";
1266 1266
                 $vars[] = "%1 _TYPE {$type}%";
1267 1267
             }
1268 1268
         }
1269 1269
 
1270
-        return (int)Database::prepare($sql)->execute($vars)->fetchOne();
1270
+        return (int) Database::prepare($sql)->execute($vars)->fetchOne();
1271 1271
     }
1272 1272
 
1273 1273
     /**
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
     private function totalPlacesQuery()
1729 1729
     {
1730 1730
         return
1731
-            (int)Database::prepare("SELECT COUNT(*) FROM `##places` WHERE p_file=?")
1731
+            (int) Database::prepare("SELECT COUNT(*) FROM `##places` WHERE p_file=?")
1732 1732
                 ->execute([$this->tree->getTreeId()])
1733 1733
                 ->fetchOne();
1734 1734
     }
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
         $chart_url .= '&amp;chs=' . $WT_STATS_MAP_X . 'x' . $WT_STATS_MAP_Y;
1887 1887
         $chart_url .= '&amp;chld=' . implode('', array_keys($surn_countries)) . '&amp;chd=s:';
1888 1888
         foreach ($surn_countries as $count) {
1889
-            $chart_url .= substr(self::GOOGLE_CHART_ENCODING, (int)($count / max($surn_countries) * 61), 1);
1889
+            $chart_url .= substr(self::GOOGLE_CHART_ENCODING, (int) ($count / max($surn_countries) * 61), 1);
1890 1890
         }
1891 1891
         $chart = '<div id="google_charts" class="center">';
1892 1892
         $chart .= '<p>' . $chart_title . '</p>';
@@ -1928,9 +1928,9 @@  discard block
 block discarded – undo
1928 1928
             $country = trim($place['country']);
1929 1929
             if (array_key_exists($country, $country_names)) {
1930 1930
                 if (!isset($all_db_countries[$country_names[$country]][$country])) {
1931
-                    $all_db_countries[$country_names[$country]][$country] = (int)$place['tot'];
1931
+                    $all_db_countries[$country_names[$country]][$country] = (int) $place['tot'];
1932 1932
                 } else {
1933
-                    $all_db_countries[$country_names[$country]][$country] += (int)$place['tot'];
1933
+                    $all_db_countries[$country_names[$country]][$country] += (int) $place['tot'];
1934 1934
                 }
1935 1935
             }
1936 1936
         }
@@ -2107,7 +2107,7 @@  discard block
 block discarded – undo
2107 2107
             $centuries = '';
2108 2108
             $counts    = [];
2109 2109
             foreach ($rows as $values) {
2110
-                $counts[]  = round(100 * $values['total'] / $tot, 0);
2110
+                $counts[] = round(100 * $values['total'] / $tot, 0);
2111 2111
                 $centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
2112 2112
             }
2113 2113
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -2201,7 +2201,7 @@  discard block
 block discarded – undo
2201 2201
             $centuries = '';
2202 2202
             $counts    = [];
2203 2203
             foreach ($rows as $values) {
2204
-                $counts[]  = round(100 * $values['total'] / $tot, 0);
2204
+                $counts[] = round(100 * $values['total'] / $tot, 0);
2205 2205
                 $centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
2206 2206
             }
2207 2207
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -2451,7 +2451,7 @@  discard block
 block discarded – undo
2451 2451
                 }
2452 2452
                 break;
2453 2453
             case 'age':
2454
-                $result = I18N::number((int)($row['age'] / 365.25));
2454
+                $result = I18N::number((int) ($row['age'] / 365.25));
2455 2455
                 break;
2456 2456
             case 'name':
2457 2457
                 $result = '<a href="' . e($person->url()) . '">' . $person->getFullName() . '</a>';
@@ -2480,7 +2480,7 @@  discard block
 block discarded – undo
2480 2480
             $sex_search = '';
2481 2481
         }
2482 2482
         if (isset($params[0])) {
2483
-            $total = (int)$params[0];
2483
+            $total = (int) $params[0];
2484 2484
         } else {
2485 2485
             $total = 10;
2486 2486
         }
@@ -2514,10 +2514,10 @@  discard block
 block discarded – undo
2514 2514
         foreach ($rows as $row) {
2515 2515
             $person = Individual::getInstance($row['deathdate'], $this->tree);
2516 2516
             $age    = $row['age'];
2517
-            if ((int)($age / 365.25) > 0) {
2518
-                $age = (int)($age / 365.25) . 'y';
2519
-            } elseif ((int)($age / 30.4375) > 0) {
2520
-                $age = (int)($age / 30.4375) . 'm';
2517
+            if ((int) ($age / 365.25) > 0) {
2518
+                $age = (int) ($age / 365.25) . 'y';
2519
+            } elseif ((int) ($age / 30.4375) > 0) {
2520
+                $age = (int) ($age / 30.4375) . 'm';
2521 2521
             } else {
2522 2522
                 $age = $age . 'd';
2523 2523
             }
@@ -2579,11 +2579,11 @@  discard block
 block discarded – undo
2579 2579
             $sex_search = '';
2580 2580
         }
2581 2581
         if (isset($params[0])) {
2582
-            $total = (int)$params[0];
2582
+            $total = (int) $params[0];
2583 2583
         } else {
2584 2584
             $total = 10;
2585 2585
         }
2586
-        $rows  = $this->runSql(
2586
+        $rows = $this->runSql(
2587 2587
             "SELECT" .
2588 2588
             " birth.d_gid AS id," .
2589 2589
             " MIN(birth.d_julianday1) AS age" .
@@ -2606,10 +2606,10 @@  discard block
 block discarded – undo
2606 2606
         foreach ($rows as $row) {
2607 2607
             $person = Individual::getInstance($row['id'], $this->tree);
2608 2608
             $age    = (WT_CLIENT_JD - $row['age']);
2609
-            if ((int)($age / 365.25) > 0) {
2610
-                $age = (int)($age / 365.25) . 'y';
2611
-            } elseif ((int)($age / 30.4375) > 0) {
2612
-                $age = (int)($age / 30.4375) . 'm';
2609
+            if ((int) ($age / 365.25) > 0) {
2610
+                $age = (int) ($age / 365.25) . 'y';
2611
+            } elseif ((int) ($age / 30.4375) > 0) {
2612
+                $age = (int) ($age / 30.4375) . 'm';
2613 2613
             } else {
2614 2614
                 $age = $age . 'd';
2615 2615
             }
@@ -2689,10 +2689,10 @@  discard block
 block discarded – undo
2689 2689
         $row = $rows[0];
2690 2690
         $age = $row['age'];
2691 2691
         if ($show_years) {
2692
-            if ((int)($age / 365.25) > 0) {
2693
-                $age = (int)($age / 365.25) . 'y';
2694
-            } elseif ((int)($age / 30.4375) > 0) {
2695
-                $age = (int)($age / 30.4375) . 'm';
2692
+            if ((int) ($age / 365.25) > 0) {
2693
+                $age = (int) ($age / 365.25) . 'y';
2694
+            } elseif ((int) ($age / 30.4375) > 0) {
2695
+                $age = (int) ($age / 30.4375) . 'm';
2696 2696
             } elseif (!empty($age)) {
2697 2697
                 $age = $age . 'd';
2698 2698
             }
@@ -2761,7 +2761,7 @@  discard block
 block discarded – undo
2761 2761
                 if ($sizes[0] < 980) {
2762 2762
                     $sizes[0] += 50;
2763 2763
                 }
2764
-                $chxl    .= $this->centuryName($century) . '|';
2764
+                $chxl .= $this->centuryName($century) . '|';
2765 2765
                 $average = 0;
2766 2766
                 if (isset($values['F'])) {
2767 2767
                     $countsf .= $values['F'] . ',';
@@ -2803,7 +2803,7 @@  discard block
 block discarded – undo
2803 2803
                 while ($offset = strpos($title, ' ', $offset + 1)) {
2804 2804
                     $counter[] = $offset;
2805 2805
                 }
2806
-                $half = (int)(count($counter) / 2);
2806
+                $half = (int) (count($counter) / 2);
2807 2807
                 $chtt = substr_replace($title, '|', $counter[$half], 1);
2808 2808
             }
2809 2809
 
@@ -3378,16 +3378,16 @@  discard block
 block discarded – undo
3378 3378
             case 'age':
3379 3379
                 $age = $row['age'];
3380 3380
                 if ($show_years) {
3381
-                    if ((int)($age / 365.25) > 0) {
3382
-                        $age = (int)($age / 365.25) . 'y';
3383
-                    } elseif ((int)($age / 30.4375) > 0) {
3384
-                        $age = (int)($age / 30.4375) . 'm';
3381
+                    if ((int) ($age / 365.25) > 0) {
3382
+                        $age = (int) ($age / 365.25) . 'y';
3383
+                    } elseif ((int) ($age / 30.4375) > 0) {
3384
+                        $age = (int) ($age / 30.4375) . 'm';
3385 3385
                     } else {
3386 3386
                         $age = $age . 'd';
3387 3387
                     }
3388 3388
                     $result = FunctionsDate::getAgeAtEvent($age);
3389 3389
                 } else {
3390
-                    $result = I18N::number((int)($age / 365.25));
3390
+                    $result = I18N::number((int) ($age / 365.25));
3391 3391
                 }
3392 3392
                 break;
3393 3393
         }
@@ -3407,7 +3407,7 @@  discard block
 block discarded – undo
3407 3407
     private function ageOfMarriageQuery($type = 'list', $age_dir = 'ASC', $params = [])
3408 3408
     {
3409 3409
         if (isset($params[0])) {
3410
-            $total = (int)$params[0];
3410
+            $total = (int) $params[0];
3411 3411
         } else {
3412 3412
             $total = 10;
3413 3413
         }
@@ -3490,10 +3490,10 @@  discard block
 block discarded – undo
3490 3490
             if ($type === 'name') {
3491 3491
                 return $family->formatList();
3492 3492
             }
3493
-            if ((int)($age / 365.25) > 0) {
3494
-                $age = (int)($age / 365.25) . 'y';
3495
-            } elseif ((int)($age / 30.4375) > 0) {
3496
-                $age = (int)($age / 30.4375) . 'm';
3493
+            if ((int) ($age / 365.25) > 0) {
3494
+                $age = (int) ($age / 365.25) . 'y';
3495
+            } elseif ((int) ($age / 30.4375) > 0) {
3496
+                $age = (int) ($age / 30.4375) . 'm';
3497 3497
             } else {
3498 3498
                 $age = $age . 'd';
3499 3499
             }
@@ -3555,7 +3555,7 @@  discard block
 block discarded – undo
3555 3555
     private function ageBetweenSpousesQuery($type = 'list', $age_dir = 'DESC', $params = [])
3556 3556
     {
3557 3557
         if (isset($params[0])) {
3558
-            $total = (int)$params[0];
3558
+            $total = (int) $params[0];
3559 3559
         } else {
3560 3560
             $total = 10;
3561 3561
         }
@@ -3600,10 +3600,10 @@  discard block
 block discarded – undo
3600 3600
                 break;
3601 3601
             }
3602 3602
             $age = $fam->age;
3603
-            if ((int)($age / 365.25) > 0) {
3604
-                $age = (int)($age / 365.25) . 'y';
3605
-            } elseif ((int)($age / 30.4375) > 0) {
3606
-                $age = (int)($age / 30.4375) . 'm';
3603
+            if ((int) ($age / 365.25) > 0) {
3604
+                $age = (int) ($age / 365.25) . 'y';
3605
+            } elseif ((int) ($age / 30.4375) > 0) {
3606
+                $age = (int) ($age / 30.4375) . 'm';
3607 3607
             } else {
3608 3608
                 $age = $age . 'd';
3609 3609
             }
@@ -3691,16 +3691,16 @@  discard block
 block discarded – undo
3691 3691
             case 'age':
3692 3692
                 $age = $row['age'];
3693 3693
                 if ($show_years) {
3694
-                    if ((int)($age / 365.25) > 0) {
3695
-                        $age = (int)($age / 365.25) . 'y';
3696
-                    } elseif ((int)($age / 30.4375) > 0) {
3697
-                        $age = (int)($age / 30.4375) . 'm';
3694
+                    if ((int) ($age / 365.25) > 0) {
3695
+                        $age = (int) ($age / 365.25) . 'y';
3696
+                    } elseif ((int) ($age / 30.4375) > 0) {
3697
+                        $age = (int) ($age / 30.4375) . 'm';
3698 3698
                     } else {
3699 3699
                         $age = $age . 'd';
3700 3700
                     }
3701 3701
                     $result = FunctionsDate::getAgeAtEvent($age);
3702 3702
                 } else {
3703
-                    $result = (int)($age / 365.25);
3703
+                    $result = (int) ($age / 365.25);
3704 3704
                 }
3705 3705
                 break;
3706 3706
         }
@@ -3786,7 +3786,7 @@  discard block
 block discarded – undo
3786 3786
             $sizes = explode('x', $size);
3787 3787
             $tot   = 0;
3788 3788
             foreach ($rows as $values) {
3789
-                $tot += (int)$values['total'];
3789
+                $tot += (int) $values['total'];
3790 3790
             }
3791 3791
             // Beware divide by zero
3792 3792
             if ($tot === 0) {
@@ -3795,7 +3795,7 @@  discard block
 block discarded – undo
3795 3795
             $centuries = '';
3796 3796
             $counts    = [];
3797 3797
             foreach ($rows as $values) {
3798
-                $counts[]  = round(100 * $values['total'] / $tot, 0);
3798
+                $counts[] = round(100 * $values['total'] / $tot, 0);
3799 3799
                 $centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
3800 3800
             }
3801 3801
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -3884,7 +3884,7 @@  discard block
 block discarded – undo
3884 3884
             $sizes = explode('x', $size);
3885 3885
             $tot   = 0;
3886 3886
             foreach ($rows as $values) {
3887
-                $tot += (int)$values['total'];
3887
+                $tot += (int) $values['total'];
3888 3888
             }
3889 3889
             // Beware divide by zero
3890 3890
             if ($tot === 0) {
@@ -3893,7 +3893,7 @@  discard block
 block discarded – undo
3893 3893
             $centuries = '';
3894 3894
             $counts    = [];
3895 3895
             foreach ($rows as $values) {
3896
-                $counts[]  = round(100 * $values['total'] / $tot, 0);
3896
+                $counts[] = round(100 * $values['total'] / $tot, 0);
3897 3897
                 $centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
3898 3898
             }
3899 3899
             $chd = $this->arrayToExtendedEncoding($counts);
@@ -4162,7 +4162,7 @@  discard block
 block discarded – undo
4162 4162
                 if ($sizes[0] < 1000) {
4163 4163
                     $sizes[0] += 50;
4164 4164
                 }
4165
-                $chxl    .= $this->centuryName($century) . '|';
4165
+                $chxl .= $this->centuryName($century) . '|';
4166 4166
                 $average = 0;
4167 4167
                 if (isset($values['F'])) {
4168 4168
                     if ($max <= 50) {
@@ -4219,7 +4219,7 @@  discard block
 block discarded – undo
4219 4219
                 while ($offset = strpos(I18N::translate('Average age in century of marriage'), ' ', $offset + 1)) {
4220 4220
                     $counter[] = $offset;
4221 4221
                 }
4222
-                $half = (int)(count($counter) / 2);
4222
+                $half = (int) (count($counter) / 2);
4223 4223
                 $chtt = substr_replace(I18N::translate('Average age in century of marriage'), '|', $counter[$half], 1);
4224 4224
             }
4225 4225
 
@@ -4751,7 +4751,7 @@  discard block
 block discarded – undo
4751 4751
     private function topTenFamilyQuery($type = 'list', $params = [])
4752 4752
     {
4753 4753
         if (isset($params[0])) {
4754
-            $total = (int)$params[0];
4754
+            $total = (int) $params[0];
4755 4755
         } else {
4756 4756
             $total = 10;
4757 4757
         }
@@ -4818,7 +4818,7 @@  discard block
 block discarded – undo
4818 4818
     private function ageBetweenSiblingsQuery($type = 'list', $params = [])
4819 4819
     {
4820 4820
         if (isset($params[0])) {
4821
-            $total = (int)$params[0];
4821
+            $total = (int) $params[0];
4822 4822
         } else {
4823 4823
             $total = 10;
4824 4824
         }
@@ -4874,10 +4874,10 @@  discard block
 block discarded – undo
4874 4874
                 return $return;
4875 4875
             }
4876 4876
             $age = $fam['age'];
4877
-            if ((int)($age / 365.25) > 0) {
4878
-                $age = (int)($age / 365.25) . 'y';
4879
-            } elseif ((int)($age / 30.4375) > 0) {
4880
-                $age = (int)($age / 30.4375) . 'm';
4877
+            if ((int) ($age / 365.25) > 0) {
4878
+                $age = (int) ($age / 365.25) . 'y';
4879
+            } elseif ((int) ($age / 30.4375) > 0) {
4880
+                $age = (int) ($age / 30.4375) . 'm';
4881 4881
             } else {
4882 4882
                 $age = $age . 'd';
4883 4883
             }
@@ -4888,7 +4888,7 @@  discard block
 block discarded – undo
4888 4888
             if ($type == 'list') {
4889 4889
                 if ($one && !in_array($fam['family'], $dist)) {
4890 4890
                     if ($child1->canShow() && $child2->canShow()) {
4891
-                        $return  = '<li>';
4891
+                        $return = '<li>';
4892 4892
                         $return  .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
4893 4893
                         $return  .= I18N::translate('and') . ' ';
4894 4894
                         $return  .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
@@ -4899,7 +4899,7 @@  discard block
 block discarded – undo
4899 4899
                         $dist[]  = $fam['family'];
4900 4900
                     }
4901 4901
                 } elseif (!$one && $child1->canShow() && $child2->canShow()) {
4902
-                    $return  = '<li>';
4902
+                    $return = '<li>';
4903 4903
                     $return  .= '<a href="' . e($child2->url()) . '">' . $child2->getFullName() . '</a> ';
4904 4904
                     $return  .= I18N::translate('and') . ' ';
4905 4905
                     $return  .= '<a href="' . e($child1->url()) . '">' . $child1->getFullName() . '</a>';
@@ -5174,7 +5174,7 @@  discard block
 block discarded – undo
5174 5174
             $total = 10;
5175 5175
         }
5176 5176
         $sizes = explode('x', $size);
5177
-        $total = (int)$total;
5177
+        $total = (int) $total;
5178 5178
         $rows  = $this->runSql(
5179 5179
             " SELECT f_numchil AS tot, f_id AS id" .
5180 5180
             " FROM `##families`" .
@@ -5187,7 +5187,7 @@  discard block
 block discarded – undo
5187 5187
         }
5188 5188
         $tot = 0;
5189 5189
         foreach ($rows as $row) {
5190
-            $tot += (int)$row['tot'];
5190
+            $tot += (int) $row['tot'];
5191 5191
         }
5192 5192
         $chd = '';
5193 5193
         $chl = [];
@@ -5199,7 +5199,7 @@  discard block
 block discarded – undo
5199 5199
                 } else {
5200 5200
                     $per = round(100 * $row['tot'] / $tot, 0);
5201 5201
                 }
5202
-                $chd   .= $this->arrayToExtendedEncoding([$per]);
5202
+                $chd .= $this->arrayToExtendedEncoding([$per]);
5203 5203
                 $chl[] = htmlspecialchars_decode(strip_tags($family->getFullName())) . ' - ' . I18N::number($row['tot']);
5204 5204
             }
5205 5205
         }
@@ -5542,7 +5542,7 @@  discard block
 block discarded – undo
5542 5542
             if ($max < $values['count']) {
5543 5543
                 $max = $values['count'];
5544 5544
             }
5545
-            $tot += (int)$values['count'];
5545
+            $tot += (int) $values['count'];
5546 5546
         }
5547 5547
         $unknown = $this->noChildrenFamiliesQuery() - $tot;
5548 5548
         if ($unknown > $max) {
@@ -5566,13 +5566,13 @@  discard block
 block discarded – undo
5566 5566
         $chm      .= 't' . $unknown . ',000000,0,' . $i . ',11,1';
5567 5567
         $chxl     .= I18N::translateContext('unknown century', 'Unknown') . '|1:||' . I18N::translate('century') . '|2:|0|';
5568 5568
         $step     = $max + 1;
5569
-        for ($d = (int)($max + 1); $d > 0; $d--) {
5569
+        for ($d = (int) ($max + 1); $d > 0; $d--) {
5570 5570
             if (($max + 1) < ($d * 10 + 1) && fmod(($max + 1), $d) == 0) {
5571 5571
                 $step = $d;
5572 5572
             }
5573 5573
         }
5574
-        if ($step == (int)($max + 1)) {
5575
-            for ($d = (int)($max); $d > 0; $d--) {
5574
+        if ($step == (int) ($max + 1)) {
5575
+            for ($d = (int) ($max); $d > 0; $d--) {
5576 5576
                 if ($max < ($d * 10 + 1) && fmod($max, $d) == 0) {
5577 5577
                     $step = $d;
5578 5578
                 }
@@ -5597,7 +5597,7 @@  discard block
 block discarded – undo
5597 5597
     private function topTenGrandFamilyQuery($type = 'list', $params = [])
5598 5598
     {
5599 5599
         if (isset($params[0])) {
5600
-            $total = (int)$params[0];
5600
+            $total = (int) $params[0];
5601 5601
         } else {
5602 5602
             $total = 10;
5603 5603
         }
@@ -5695,8 +5695,8 @@  discard block
 block discarded – undo
5695 5695
      */
5696 5696
     private function commonSurnamesQuery($type = 'list', $show_tot = false, $params = [])
5697 5697
     {
5698
-        $threshold          = empty($params[0]) ? 10 : (int)$params[0];
5699
-        $number_of_surnames = empty($params[1]) ? 10 : (int)$params[1];
5698
+        $threshold          = empty($params[0]) ? 10 : (int) $params[0];
5699
+        $number_of_surnames = empty($params[1]) ? 10 : (int) $params[1];
5700 5700
         $sorting            = empty($params[2]) ? 'alpha' : $params[2];
5701 5701
 
5702 5702
         $surname_list = FunctionsDb::getTopSurnames($this->tree->getTreeId(), $threshold, $number_of_surnames);
@@ -5819,7 +5819,7 @@  discard block
 block discarded – undo
5819 5819
         $size               = empty($params[0]) ? $WT_STATS_S_CHART_X . 'x' . $WT_STATS_S_CHART_Y : strtolower($params[0]);
5820 5820
         $color_from         = empty($params[1]) ? $WT_STATS_CHART_COLOR1 : strtolower($params[1]);
5821 5821
         $color_to           = empty($params[2]) ? $WT_STATS_CHART_COLOR2 : strtolower($params[2]);
5822
-        $number_of_surnames = empty($params[3]) ? 10 : (int)$params[3];
5822
+        $number_of_surnames = empty($params[3]) ? 10 : (int) $params[3];
5823 5823
 
5824 5824
         $sizes    = explode('x', $size);
5825 5825
         $tot_indi = $this->totalIndividualsQuery();
@@ -5841,7 +5841,7 @@  discard block
 block discarded – undo
5841 5841
             $max_name  = 0;
5842 5842
             $top_name  = '';
5843 5843
             foreach ($surns as $spfxsurn => $indis) {
5844
-                $per       = count($indis);
5844
+                $per = count($indis);
5845 5845
                 $count_per += $per;
5846 5846
                 // select most common surname from all variants
5847 5847
                 if ($per > $max_name) {
@@ -5865,11 +5865,11 @@  discard block
 block discarded – undo
5865 5865
                     ], $top_name);
5866 5866
             }
5867 5867
             $per   = round(100 * $count_per / $tot_indi, 0);
5868
-            $chd   .= $this->arrayToExtendedEncoding([$per]);
5868
+            $chd .= $this->arrayToExtendedEncoding([$per]);
5869 5869
             $chl[] = $top_name . ' - ' . I18N::number($count_per);
5870 5870
         }
5871 5871
         $per   = round(100 * ($tot_indi - $tot) / $tot_indi, 0);
5872
-        $chd   .= $this->arrayToExtendedEncoding([$per]);
5872
+        $chd .= $this->arrayToExtendedEncoding([$per]);
5873 5873
         $chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
5874 5874
 
5875 5875
         $chart_title = implode(I18N::$list_separator, $chl);
@@ -5891,12 +5891,12 @@  discard block
 block discarded – undo
5891 5891
     private function commonGivenQuery($sex = 'B', $type = 'list', $show_tot = false, $params = [])
5892 5892
     {
5893 5893
         if (isset($params[0]) && $params[0] != '' && $params[0] >= 0) {
5894
-            $threshold = (int)$params[0];
5894
+            $threshold = (int) $params[0];
5895 5895
         } else {
5896 5896
             $threshold = 1;
5897 5897
         }
5898 5898
         if (isset($params[1]) && $params[1] != '' && $params[1] >= 0) {
5899
-            $maxtoshow = (int)$params[1];
5899
+            $maxtoshow = (int) $params[1];
5900 5900
         } else {
5901 5901
             $maxtoshow = 10;
5902 5902
         }
@@ -6369,11 +6369,11 @@  discard block
 block discarded – undo
6369 6369
             } else {
6370 6370
                 $per = round(100 * $count / $tot_indi, 0);
6371 6371
             }
6372
-            $chd   .= $this->arrayToExtendedEncoding([$per]);
6372
+            $chd .= $this->arrayToExtendedEncoding([$per]);
6373 6373
             $chl[] = $givn . ' - ' . I18N::number($count);
6374 6374
         }
6375 6375
         $per   = round(100 * ($tot_indi - $tot) / $tot_indi, 0);
6376
-        $chd   .= $this->arrayToExtendedEncoding([$per]);
6376
+        $chd .= $this->arrayToExtendedEncoding([$per]);
6377 6377
         $chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
6378 6378
 
6379 6379
         $chart_title = implode(I18N::$list_separator, $chl);
@@ -6604,7 +6604,7 @@  discard block
 block discarded – undo
6604 6604
                     $datestamp = I18N::dateFormat();
6605 6605
                 }
6606 6606
 
6607
-                return FunctionsDate::timestampToGedcomDate((int)$user->getPreference('reg_timestamp'))->display(false, $datestamp);
6607
+                return FunctionsDate::timestampToGedcomDate((int) $user->getPreference('reg_timestamp'))->display(false, $datestamp);
6608 6608
             case 'regtime':
6609 6609
                 if (is_array($params) && isset($params[0]) && $params[0] != '') {
6610 6610
                     $datestamp = $params[0];
@@ -6612,7 +6612,7 @@  discard block
 block discarded – undo
6612 6612
                     $datestamp = str_replace('%', '', I18N::timeFormat());
6613 6613
                 }
6614 6614
 
6615
-                return date($datestamp, (int)$user->getPreference('reg_timestamp'));
6615
+                return date($datestamp, (int) $user->getPreference('reg_timestamp'));
6616 6616
             case 'loggedin':
6617 6617
                 if (is_array($params) && isset($params[0]) && $params[0] != '') {
6618 6618
                     $yes = $params[0];
@@ -6952,9 +6952,9 @@  discard block
 block discarded – undo
6952 6952
             if ($value < 0) {
6953 6953
                 $value = 0;
6954 6954
             }
6955
-            $first    = (int)($value / 64);
6955
+            $first    = (int) ($value / 64);
6956 6956
             $second   = $value % 64;
6957
-            $encoding .= $xencoding[(int)$first] . $xencoding[(int)$second];
6957
+            $encoding .= $xencoding[(int) $first] . $xencoding[(int) $second];
6958 6958
         }
6959 6959
 
6960 6960
         return $encoding;
@@ -7097,7 +7097,7 @@  discard block
 block discarded – undo
7097 7097
      */
7098 7098
     public function totalUserMessages()
7099 7099
     {
7100
-        $total = (int)Database::prepare("SELECT COUNT(*) FROM `##message` WHERE user_id = ?")
7100
+        $total = (int) Database::prepare("SELECT COUNT(*) FROM `##message` WHERE user_id = ?")
7101 7101
             ->execute([Auth::id()])
7102 7102
             ->fetchOne();
7103 7103
 
@@ -7112,7 +7112,7 @@  discard block
 block discarded – undo
7112 7112
     public function totalUserJournal()
7113 7113
     {
7114 7114
         try {
7115
-            $number = (int)Database::prepare("SELECT COUNT(*) FROM `##news` WHERE user_id = ?")
7115
+            $number = (int) Database::prepare("SELECT COUNT(*) FROM `##news` WHERE user_id = ?")
7116 7116
                 ->execute([Auth::id()])
7117 7117
                 ->fetchOne();
7118 7118
         } catch (PDOException $ex) {
@@ -7133,7 +7133,7 @@  discard block
 block discarded – undo
7133 7133
     public function totalGedcomNews()
7134 7134
     {
7135 7135
         try {
7136
-            $number = (int)Database::prepare("SELECT COUNT(*) FROM `##news` WHERE gedcom_id = ?")
7136
+            $number = (int) Database::prepare("SELECT COUNT(*) FROM `##news` WHERE gedcom_id = ?")
7137 7137
                 ->execute([$this->tree->getTreeId()])
7138 7138
                 ->fetchOne();
7139 7139
         } catch (PDOException $ex) {
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ForgotPasswordController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
             Log::addAuthenticationLog('Password request was sent to user: ' . $user->getUserName());
73 73
 
74
-            $sender = new User((object)[
74
+            $sender = new User((object) [
75 75
                 'user_id'   => null,
76 76
                 'user_name' => '',
77 77
                 'real_name' => $tree->getTitle(),
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $max       = strlen($passchars) - 1;
107 107
 
108 108
         for ($i = 0; $i < 8; $i++) {
109
-            $index    = rand(0, $max);
109
+            $index = rand(0, $max);
110 110
             $password .= $passchars{$index};
111 111
         }
112 112
 
Please login to merge, or discard this patch.