Passed
Push — analysis-z4j9Ae ( f10e19 )
by Greg
11:08 queued 02:38
created
app/Http/Controllers/CalendarController.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
             if (strlen($match[1]) > strlen($match[2])) {
73 73
                 $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2];
74 74
             }
75
-            $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}");
75
+            $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}");
76 76
             $view     = 'year';
77 77
         } else {
78 78
             // advanced-year "decade/century wildcard"
79 79
             if (preg_match('/^(\d+)(\?+)$/', $year, $match)) {
80 80
                 $y1       = $match[1] . str_replace('?', '0', $match[2]);
81 81
                 $y2       = $match[1] . str_replace('?', '9', $match[2]);
82
-                $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}");
82
+                $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}");
83 83
                 $view     = 'year';
84 84
             } else {
85 85
                 if ($year < 0) {
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
             if (strlen($match[1]) > strlen($match[2])) {
192 192
                 $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2];
193 193
             }
194
-            $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}");
194
+            $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}");
195 195
             $view     = 'year';
196 196
         } else {
197 197
             // advanced-year "decade/century wildcard"
198 198
             if (preg_match('/^(\d+)(\?+)$/', $year, $match)) {
199 199
                 $y1       = $match[1] . str_replace('?', '0', $match[2]);
200 200
                 $y2       = $match[1] . str_replace('?', '9', $match[2]);
201
-                $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}");
201
+                $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}");
202 202
                 $view     = 'year';
203 203
             } else {
204 204
                 if ($year < 0) {
Please login to merge, or discard this patch.
app/Functions/FunctionsPrint.php 2 patches
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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     if ($note->canShow()) {
146 146
                         $noterec = $note->gedcom();
147 147
                         $nt      = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
148
-                        $data    .= self::printNoteRecord($tree, ($nt > 0) ? $n1match[1] : '', 1, $noterec);
148
+                        $data .= self::printNoteRecord($tree, ($nt > 0) ? $n1match[1] : '', 1, $noterec);
149 149
                     }
150 150
                 } else {
151 151
                     $data = '<div class="fact_NOTE"><span class="label">' . I18N::translate('Note') . '</span>: <span class="field error">' . $nmatch[1] . '</span></div>';
@@ -362,20 +362,20 @@  discard block
 block discarded – undo
362 362
                 if (preg_match_all('/\n3 (?:_HEB|ROMN) (.+)/', $placerec, $matches)) {
363 363
                     foreach ($matches[1] as $match) {
364 364
                         $wt_place = new Place($match, $tree);
365
-                        $html     .= ' - ' . $wt_place->fullName();
365
+                        $html .= ' - ' . $wt_place->fullName();
366 366
                     }
367 367
                 }
368 368
                 $map_lati = '';
369 369
                 $cts      = preg_match('/\d LATI (.*)/', $placerec, $match);
370 370
                 if ($cts > 0) {
371 371
                     $map_lati = $match[1];
372
-                    $html     .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
372
+                    $html .= '<br><span class="label">' . I18N::translate('Latitude') . ': </span>' . $map_lati;
373 373
                 }
374 374
                 $map_long = '';
375 375
                 $cts      = preg_match('/\d LONG (.*)/', $placerec, $match);
376 376
                 if ($cts > 0) {
377 377
                     $map_long = $match[1];
378
-                    $html     .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
378
+                    $html .= ' <span class="label">' . I18N::translate('Longitude') . ': </span>' . $map_long;
379 379
                 }
380 380
                 if ($map_lati && $map_long) {
381 381
                     $map_lati = trim(strtr($map_lati, 'NSEW,�', ' - -. ')); // S5,6789 ==> -5.6789
Please login to merge, or discard this patch.
app/Http/Controllers/HomePageController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -840,9 +840,9 @@
 block discarded – undo
840 840
         }
841 841
 
842 842
         foreach ([
843
-                     'main' => $main_blocks,
844
-                     'side' => $side_blocks,
845
-                 ] as $location => $updated_blocks) {
843
+                        'main' => $main_blocks,
844
+                        'side' => $side_blocks,
845
+                    ] as $location => $updated_blocks) {
846 846
             foreach ($updated_blocks as $block_order => $block_id) {
847 847
                 if (is_numeric($block_id)) {
848 848
                     // Updated block
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -657,7 +657,7 @@
 block discarded – undo
657 657
     private function filterActiveBlocks(Collection $blocks, Collection $active_blocks): Collection
658 658
     {
659 659
         return $blocks->map(function (string $block_name) use ($active_blocks): ?ModuleBlockInterface {
660
-            return $active_blocks->filter(function (ModuleInterface $block) use ($block_name): bool {
660
+            return $active_blocks->filter(function (ModuleInterface $block) use ($block_name) : bool {
661 661
                 return $block->name() === $block_name;
662 662
             })->first();
663 663
         })
Please login to merge, or discard this patch.
app/MediaFile.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,10 +224,10 @@
 block discarded – undo
224 224
             $src    = $this->imageUrl($width, $height, $fit);
225 225
             $srcset = [];
226 226
             foreach ([
227
-                         2,
228
-                         3,
229
-                         4,
230
-                     ] as $x) {
227
+                            2,
228
+                            3,
229
+                            4,
230
+                        ] as $x) {
231 231
                 $srcset[] = $this->imageUrl($width * $x, $height * $x, $fit) . ' ' . $x . 'x';
232 232
             }
233 233
         }
Please login to merge, or discard this patch.
app/Module/PlacesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -291,7 +291,7 @@
 block discarded – undo
291 291
                     'provider' => 'openstreetmap',
292 292
                     'style'    => 'mapnik',
293 293
                 ];
294
-                self::$map_providers  = [
294
+                self::$map_providers = [
295 295
                     'openstreetmap' => [
296 296
                         'name'   => 'OpenStreetMap',
297 297
                         'styles' => ['mapnik' => 'Mapnik'],
Please login to merge, or discard this patch.
app/Date/JulianDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         }
75 75
 
76 76
         if (preg_match('/^(\d+) B\.C\.$/', $year, $match)) {
77
-            return - (int) $match[1];
77
+            return -(int) $match[1];
78 78
         }
79 79
 
80 80
         return (int) $year;
Please login to merge, or discard this patch.
app/Date.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         // Ambiguous dates - don't override calendar escape
163 163
         if ($cal == '') {
164 164
             if (preg_match('/^(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)$/', $m)) {
165
-                $cal =  GregorianDate::ESCAPE;
165
+                $cal = GregorianDate::ESCAPE;
166 166
             } else {
167 167
                 if (preg_match('/^[345]\d\d\d$/', $y)) {
168 168
                     // Year 3000-5999
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     public function addYears(int $years, string $qualifier = ''): Date
461 461
     {
462 462
         $tmp               = clone $this;
463
-        $tmp->date1->year  += $years;
463
+        $tmp->date1->year += $years;
464 464
         $tmp->date1->month = 0;
465 465
         $tmp->date1->day   = 0;
466 466
         $tmp->date1->setJdFromYmd();
Please login to merge, or discard this patch.
app/Functions/Functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                                 return $new_path;
321 321
                             }
322 322
 
323
-                            $paths[]                     = $new_path;
323
+                            $paths[] = $new_path;
324 324
                             $visited[$spouse->xref()] = true;
325 325
                         }
326 326
                     }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                                 return $new_path;
335 335
                             }
336 336
 
337
-                            $paths[]                    = $new_path;
337
+                            $paths[] = $new_path;
338 338
                             $visited[$child->xref()] = true;
339 339
                         }
340 340
                     }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
                                 return $new_path;
354 354
                             }
355 355
 
356
-                            $paths[]                     = $new_path;
356
+                            $paths[] = $new_path;
357 357
                             $visited[$spouse->xref()] = true;
358 358
                         }
359 359
                     }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                                 return $new_path;
368 368
                             }
369 369
 
370
-                            $paths[]                    = $new_path;
370
+                            $paths[] = $new_path;
371 371
                             $visited[$child->xref()] = true;
372 372
                         }
373 373
                     }
Please login to merge, or discard this patch.
app/Module/OnThisDayModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 
122 122
         // If we are only showing living individuals, then we don't need to search for DEAT events.
123 123
         if ($filter) {
124
-            $event_array  = array_diff($event_array, Gedcom::DEATH_EVENTS);
124
+            $event_array = array_diff($event_array, Gedcom::DEATH_EVENTS);
125 125
         }
126 126
 
127 127
         $events_filter = implode('|', $event_array);
Please login to merge, or discard this patch.