@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // Dead people... |
| 125 | 125 | if ($this->tree->getPreference('SHOW_DEAD_PEOPLE') >= $access_level && $this->isDead()) { |
| 126 | 126 | $keep_alive = false; |
| 127 | - $KEEP_ALIVE_YEARS_BIRTH = (int)$this->tree->getPreference('KEEP_ALIVE_YEARS_BIRTH'); |
|
| 127 | + $KEEP_ALIVE_YEARS_BIRTH = (int) $this->tree->getPreference('KEEP_ALIVE_YEARS_BIRTH'); |
|
| 128 | 128 | if ($KEEP_ALIVE_YEARS_BIRTH) { |
| 129 | 129 | preg_match_all('/\n1 (?:' . WT_EVENTS_BIRT . ').*(?:\n[2-9].*)*(?:\n2 DATE (.+))/', $this->gedcom, $matches, PREG_SET_ORDER); |
| 130 | 130 | foreach ($matches as $match) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | - $KEEP_ALIVE_YEARS_DEATH = (int)$this->tree->getPreference('KEEP_ALIVE_YEARS_DEATH'); |
|
| 138 | + $KEEP_ALIVE_YEARS_DEATH = (int) $this->tree->getPreference('KEEP_ALIVE_YEARS_DEATH'); |
|
| 139 | 139 | if ($KEEP_ALIVE_YEARS_DEATH) { |
| 140 | 140 | preg_match_all('/\n1 (?:' . WT_EVENTS_DEAT . ').*(?:\n[2-9].*)*(?:\n2 DATE (.+))/', $this->gedcom, $matches, PREG_SET_ORDER); |
| 141 | 141 | foreach ($matches as $match) { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | // Consider relationship privacy (unless an admin is applying download restrictions) |
| 154 | - $user_path_length = (int)$this->tree->getUserPreference(Auth::user(), 'RELATIONSHIP_PATH_LENGTH'); |
|
| 154 | + $user_path_length = (int) $this->tree->getUserPreference(Auth::user(), 'RELATIONSHIP_PATH_LENGTH'); |
|
| 155 | 155 | $gedcomid = $this->tree->getUserPreference(Auth::user(), 'gedcomid'); |
| 156 | 156 | if ($gedcomid !== '' && $user_path_length > 0) { |
| 157 | 157 | return self::isRelated($this, $user_path_length); |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | */ |
| 324 | 324 | public function isDead(): bool |
| 325 | 325 | { |
| 326 | - $MAX_ALIVE_AGE = (int)$this->tree->getPreference('MAX_ALIVE_AGE'); |
|
| 326 | + $MAX_ALIVE_AGE = (int) $this->tree->getPreference('MAX_ALIVE_AGE'); |
|
| 327 | 327 | |
| 328 | 328 | // "1 DEAT Y" or "1 DEAT/2 DATE" or "1 DEAT/2 PLAC" |
| 329 | 329 | if (preg_match('/\n1 (?:' . WT_EVENTS_DEAT . ')(?: Y|(?:\n[2-9].+)*\n2 (DATE|PLAC) )/', $this->gedcom)) { |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | if ($min && $max) { |
| 713 | 713 | $gregorian_calendar = new GregorianCalendar(); |
| 714 | 714 | |
| 715 | - list($year) = $gregorian_calendar->jdToYmd((int)((max($min) + min($max)) / 2)); |
|
| 715 | + list($year) = $gregorian_calendar->jdToYmd((int) ((max($min) + min($max)) / 2)); |
|
| 716 | 716 | $this->estimated_birth_date = new Date('EST ' . $year); |
| 717 | 717 | } else { |
| 718 | 718 | $this->estimated_birth_date = new Date(''); // always return a date object |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | } |
| 740 | 740 | if ($this->estimated_death_date === null) { |
| 741 | 741 | if ($this->getEstimatedBirthDate()->minimumJulianDay()) { |
| 742 | - $max_alive_age = (int)$this->tree->getPreference('MAX_ALIVE_AGE'); |
|
| 742 | + $max_alive_age = (int) $this->tree->getPreference('MAX_ALIVE_AGE'); |
|
| 743 | 743 | $this->estimated_death_date = $this->getEstimatedBirthDate()->addYears($max_alive_age, 'BEF'); |
| 744 | 744 | } else { |
| 745 | 745 | $this->estimated_death_date = new Date(''); // always return a date object |
@@ -1107,7 +1107,7 @@ discard block |
||
| 1107 | 1107 | if ($display) { |
| 1108 | 1108 | $txt .= ' style="display:' . $display . '"'; |
| 1109 | 1109 | } |
| 1110 | - $txt .= '>'; |
|
| 1110 | + $txt .= '>'; |
|
| 1111 | 1111 | $husb = $fam->getHusband(); |
| 1112 | 1112 | if ($husb) { |
| 1113 | 1113 | // Temporarily reset the 'prefered' display name, as we always |
@@ -1179,7 +1179,7 @@ discard block |
||
| 1179 | 1179 | // Extract the structured name parts - use for "sortable" names and indexes |
| 1180 | 1180 | //////////////////////////////////////////////////////////////////////////// |
| 1181 | 1181 | |
| 1182 | - $sublevel = 1 + (int)$gedcom[0]; |
|
| 1182 | + $sublevel = 1 + (int) $gedcom[0]; |
|
| 1183 | 1183 | $NPFX = preg_match("/\n{$sublevel} NPFX (.+)/", $gedcom, $match) ? $match[1] : ''; |
| 1184 | 1184 | $GIVN = preg_match("/\n{$sublevel} GIVN (.+)/", $gedcom, $match) ? $match[1] : ''; |
| 1185 | 1185 | $SURN = preg_match("/\n{$sublevel} SURN (.+)/", $gedcom, $match) ? $match[1] : ''; |