| @@ -72,14 +72,14 @@ discard block | ||
| 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 | ||
| 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) { | 
| @@ -345,10 +345,10 @@ | ||
| 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 | } | 
| @@ -145,7 +145,7 @@ discard block | ||
| 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 | ||
| 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 | 
| @@ -840,9 +840,9 @@ | ||
| 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 | 
| @@ -657,7 +657,7 @@ | ||
| 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 | }) | 
| @@ -224,10 +224,10 @@ | ||
| 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 | } | 
| @@ -291,7 +291,7 @@ | ||
| 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'], | 
| @@ -74,7 +74,7 @@ | ||
| 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; | 
| @@ -162,7 +162,7 @@ discard block | ||
| 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 | ||
| 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(); | 
| @@ -320,7 +320,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | } | 
| @@ -121,7 +121,7 @@ | ||
| 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); |