Completed
Pull Request — master (#1866)
by Rico
09:37
created
app/Soundex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3616,7 +3616,7 @@
 block discarded – undo
3616 3616
             $soundTableEntry = self::$dmsounds[$thisEntry];
3617 3617
             $workingResult   = $partialResult;
3618 3618
             $partialResult   = [];
3619
-            $currPos         += strlen($thisEntry);
3619
+            $currPos += strlen($thisEntry);
3620 3620
 
3621 3621
             // Not at beginning of input string
3622 3622
             if ($state != 1) {
Please login to merge, or discard this patch.
app/Report/ReportPdfText.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         if ($this->wrapWidthRemaining > 0) {
123 123
             // Check with line counter too!
124 124
             // but floor the $wrapWidthRemaining first to keep it bugfree!
125
-            $wrapWidthRemaining = (int)($this->wrapWidthRemaining);
125
+            $wrapWidthRemaining = (int) ($this->wrapWidthRemaining);
126 126
             if ($lw >= $wrapWidthRemaining || $lfct > 1) {
127 127
                 $newtext = '';
128 128
                 $lines   = explode("\n", $this->text);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                                     $newtext .= ' ';
145 145
                                 }
146 146
                             } else {
147
-                                $lw      = $pdf->GetStringWidth($word . ' ');
147
+                                $lw = $pdf->GetStringWidth($word . ' ');
148 148
                                 $newtext .= "\n$word";
149 149
                                 if ($addspace != 0) {
150 150
                                     $newtext .= ' ';
Please login to merge, or discard this patch.
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/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/Http/Controllers/Auth/VerifyEmailController.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
 
61 61
             // Create a dummy user, so we can send messages from the tree.
62 62
             $sender = new User(
63
-                (object)[
63
+                (object) [
64 64
                     'user_id'   => null,
65 65
                     'user_name' => '',
66 66
                     'real_name' => $tree->getTitle(),
Please login to merge, or discard this patch.
app/Http/Controllers/AncestorsChartController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
         $this->checkIndividualAccess($individual);
65 65
 
66 66
         $minimum_generations = 2;
67
-        $maximum_generations = (int)$tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
68
-        $default_generations = (int)$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
67
+        $maximum_generations = (int) $tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
68
+        $default_generations = (int) $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
69 69
 
70
-        $show_cousins = (bool)$request->get('show_cousins', self::DEFAULT_COUSINS);
71
-        $chart_style  = (int)$request->get('chart_style', self::DEFAULT_STYLE);
72
-        $generations  = (int)$request->get('generations', $default_generations);
70
+        $show_cousins = (bool) $request->get('show_cousins', self::DEFAULT_COUSINS);
71
+        $chart_style  = (int) $request->get('chart_style', self::DEFAULT_STYLE);
72
+        $generations  = (int) $request->get('generations', $default_generations);
73 73
 
74 74
         $generations = min($generations, $maximum_generations);
75 75
         $generations = max($generations, $minimum_generations);
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
         $this->checkIndividualAccess($individual);
113 113
 
114 114
         $minimum_generations = 2;
115
-        $maximum_generations = (int)$tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
116
-        $default_generations = (int)$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
115
+        $maximum_generations = (int) $tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
116
+        $default_generations = (int) $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
117 117
 
118
-        $show_cousins = (bool)$request->get('show_cousins', self::DEFAULT_COUSINS);
119
-        $chart_style  = (int)$request->get('chart_style', self::DEFAULT_STYLE);
120
-        $generations  = (int)$request->get('generations', $default_generations);
118
+        $show_cousins = (bool) $request->get('show_cousins', self::DEFAULT_COUSINS);
119
+        $chart_style  = (int) $request->get('chart_style', self::DEFAULT_STYLE);
120
+        $generations  = (int) $request->get('generations', $default_generations);
121 121
 
122 122
         $generations = min($generations, $maximum_generations);
123 123
         $generations = max($generations, $minimum_generations);
Please login to merge, or discard this patch.
app/Http/Controllers/PedigreeChartController.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
         $this->checkIndividualAccess($individual);
96 96
 
97
-        $orientation = (int)$request->get('orientation', self::LANDSCAPE);
98
-        $generations = (int)$request->get('generations', self::DEFAULT_GENERATIONS);
97
+        $orientation = (int) $request->get('orientation', self::LANDSCAPE);
98
+        $generations = (int) $request->get('generations', self::DEFAULT_GENERATIONS);
99 99
 
100 100
         $generations = min(self::MAX_GENERATIONS, $generations);
101 101
         $generations = max(self::MIN_GENERATIONS, $generations);
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 
134 134
         $this->checkIndividualAccess($individual);
135 135
 
136
-        $this->orientation = (int)$request->get('orientation');
137
-        $this->generations = (int)$request->get('generations');
136
+        $this->orientation = (int) $request->get('orientation');
137
+        $this->generations = (int) $request->get('generations');
138 138
         $bxspacing         = Theme::theme()->parameter('chart-spacing-x');
139 139
         $byspacing         = Theme::theme()->parameter('chart-spacing-y');
140 140
         $curgen            = 1; // -- track which generation the algorithm is currently working on
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         }, array_values($this->sosaStradonitzAncestors($individual, $this->generations)));
160 160
 
161 161
         //check earliest generation for any ancestors
162
-        for ($i = (int)($this->treesize / 2); $i < $this->treesize; $i++) {
162
+        for ($i = (int) ($this->treesize / 2); $i < $this->treesize; $i++) {
163 163
             $this->chartHasAncestors = $this->chartHasAncestors || ($this->nodes[$i]['indi'] && $this->nodes[$i]['indi']->getChildFamilies());
164 164
         }
165 165
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         for ($i = ($this->treesize - 1); $i >= 0; $i--) {
195 195
 
196 196
             // -- check to see if we have moved to the next generation
197
-            if ($i < (int)($this->treesize / pow(2, $curgen))) {
197
+            if ($i < (int) ($this->treesize / pow(2, $curgen))) {
198 198
                 $curgen++;
199 199
             }
200 200
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                         } else {
226 226
                             $yoffset = $yoffset + (($boxspacing / 2) * ($curgen - 1));
227 227
                         }
228
-                        $parent = (int)(($i - 1) / 2);
228
+                        $parent = (int) (($i - 1) / 2);
229 229
                         $pgen   = $curgen;
230 230
                         while ($parent > 0) {
231 231
                             if ($parent % 2 == 0) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                                     $yoffset = $yoffset + (($boxspacing / 2) * $temp);
246 246
                                 }
247 247
                             }
248
-                            $parent = (int)(($parent - 1) / 2);
248
+                            $parent = (int) (($parent - 1) / 2);
249 249
                         }
250 250
                         if ($curgen > 3) {
251 251
                             $temp = 0;
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
                     }
282 282
                     break;
283 283
             }
284
-            $this->nodes[$i]['x'] = (int)$xoffset;
285
-            $this->nodes[$i]['y'] = (int)$yoffset;
284
+            $this->nodes[$i]['x'] = (int) $xoffset;
285
+            $this->nodes[$i]['y'] = (int) $yoffset;
286 286
         }
287 287
 
288 288
         // find the minimum x & y offsets and deduct that number from
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         $canvas_width   = $max_xoffset + $bxspacing + Theme::theme()->parameter('chart-box-x') + $addoffset['x'];
312 312
         $canvas_height  = $max_yoffset + $byspacing + Theme::theme()->parameter('chart-box-y') + $addoffset['y'];
313 313
         $posn           = I18N::direction() === 'rtl' ? 'right' : 'left';
314
-        $last_gen_start = (int)floor($this->treesize / 2);
314
+        $last_gen_start = (int) floor($this->treesize / 2);
315 315
         if ($this->orientation === self::OLDEST_AT_TOP || $this->orientation === self::OLDEST_AT_BOTTOM) {
316 316
             $flex_direction = ' flex-column';
317 317
         } else {
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
             $html = sprintf('<div id="childarrow"><a href="#" class="menuselect %s"></a><div id="childbox-pedigree">', $this->arrows->menu);
361 361
 
362 362
             foreach ($families as $family) {
363
-                $html   .= '<span class="name1">' . I18N::translate('Family') . '</span>';
363
+                $html .= '<span class="name1">' . I18N::translate('Family') . '</span>';
364 364
                 $spouse = $family->getSpouse($this->root);
365 365
                 if ($spouse) {
366 366
                     $html .= '<a class="name1" href="' . e(route('pedigree', [
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
         $html = '';
422 422
         if ($this->chartHasAncestors) {
423 423
             if ($this->nodes[$index]['indi'] && $this->nodes[$index]['indi']->getChildFamilies()) {
424
-                $html         .= '<div class="ancestorarrow">';
424
+                $html .= '<div class="ancestorarrow">';
425 425
                 $rootParentId = 1;
426
-                if ($index > (int)($this->treesize / 2) + (int)($this->treesize / 4)) {
426
+                if ($index > (int) ($this->treesize / 2) + (int) ($this->treesize / 4)) {
427 427
                     $rootParentId++;
428 428
                 }
429 429
                 $html .= '<a class="' . $this->arrows->prevGen . '" href="' . e(route('pedigree', [
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
     private function generationOptions(Tree $tree): array
451 451
     {
452 452
         // @TODO - do we need this config setting, given that we cannot show more than 8 generations?
453
-        $max_generations = min(self::MAX_GENERATIONS, (int)$tree->getPreference('MAX_PEDIGREE_GENERATIONS'));
453
+        $max_generations = min(self::MAX_GENERATIONS, (int) $tree->getPreference('MAX_PEDIGREE_GENERATIONS'));
454 454
 
455 455
         return FunctionsEdit::numericOptions(range(self::MIN_GENERATIONS, $max_generations));
456 456
     }
Please login to merge, or discard this patch.