@@ -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 |
@@ -177,14 +177,14 @@ discard block |
||
| 177 | 177 | case '_BIRT_CHIL': |
| 178 | 178 | $children[$fact->getParent()->getXref()] = true; |
| 179 | 179 | /* I18N: Abbreviation for "number %s" */ |
| 180 | - $label .= '<br>' . I18N::translate('#%s', count($children)); |
|
| 180 | + $label .= '<br>' . I18N::translate('#%s', count($children)); |
|
| 181 | 181 | break; |
| 182 | 182 | case '_BIRT_GCHI': |
| 183 | 183 | case '_BIRT_GCH1': |
| 184 | 184 | case '_BIRT_GCH2': |
| 185 | 185 | $grandchildren[$fact->getParent()->getXref()] = true; |
| 186 | 186 | /* I18N: Abbreviation for "number %s" */ |
| 187 | - $label .= '<br>' . I18N::translate('#%s', count($grandchildren)); |
|
| 187 | + $label .= '<br>' . I18N::translate('#%s', count($grandchildren)); |
|
| 188 | 188 | break; |
| 189 | 189 | } |
| 190 | 190 | |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | for ($j = 0; $j < $ct; $j++) { |
| 579 | 579 | if (strpos($match[$j][1], '@') === false) { |
| 580 | 580 | $source = e($match[$j][1] . preg_replace('/\n\d CONT ?/', "\n", $match[$j][2])); |
| 581 | - $data .= '<div class="fact_SOUR"><span class="label">' . I18N::translate('Source') . ':</span> <span class="field" dir="auto">' . Filter::formatText($source, $tree) . '</span></div>'; |
|
| 581 | + $data .= '<div class="fact_SOUR"><span class="label">' . I18N::translate('Source') . ':</span> <span class="field" dir="auto">' . Filter::formatText($source, $tree) . '</span></div>'; |
|
| 582 | 582 | } |
| 583 | 583 | } |
| 584 | 584 | // Find source for each fact |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | } |
| 597 | 597 | $srec = substr($factrec, $spos1, $spos2 - $spos1); |
| 598 | 598 | $lt = preg_match_all("/$nlevel \w+/", $srec, $matches); |
| 599 | - $data .= '<div class="fact_SOUR">'; |
|
| 599 | + $data .= '<div class="fact_SOUR">'; |
|
| 600 | 600 | $elementID = Uuid::uuid4()->toString(); |
| 601 | 601 | if ($tree->getPreference('EXPAND_SOURCES')) { |
| 602 | 602 | $plusminus = 'icon-minus'; |
@@ -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 |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | if ($openParIndex !== false) { |
| 294 | 294 | // Opening parentheses always inherit the following directionality |
| 295 | 295 | self::$waitingText .= $currentLetter; |
| 296 | - $workingText = substr($workingText, $currentLen); |
|
| 296 | + $workingText = substr($workingText, $currentLen); |
|
| 297 | 297 | while (true) { |
| 298 | 298 | if ($workingText === '') { |
| 299 | 299 | break; |
@@ -301,13 +301,13 @@ discard block |
||
| 301 | 301 | if (substr($workingText, 0, 1) === ' ') { |
| 302 | 302 | // Spaces following this left parenthesis inherit the following directionality too |
| 303 | 303 | self::$waitingText .= ' '; |
| 304 | - $workingText = substr($workingText, 1); |
|
| 304 | + $workingText = substr($workingText, 1); |
|
| 305 | 305 | continue; |
| 306 | 306 | } |
| 307 | 307 | if (substr($workingText, 0, 6) === ' ') { |
| 308 | 308 | // Spaces following this left parenthesis inherit the following directionality too |
| 309 | 309 | self::$waitingText .= ' '; |
| 310 | - $workingText = substr($workingText, 6); |
|
| 310 | + $workingText = substr($workingText, 6); |
|
| 311 | 311 | continue; |
| 312 | 312 | } |
| 313 | 313 | break; |
@@ -324,9 +324,9 @@ discard block |
||
| 324 | 324 | // Exceptions to this rule will be handled later during final clean-up. |
| 325 | 325 | // |
| 326 | 326 | self::$waitingText .= $currentLetter; |
| 327 | - $workingText = substr($workingText, $currentLen); |
|
| 327 | + $workingText = substr($workingText, $currentLen); |
|
| 328 | 328 | if (self::$currentState != '') { |
| 329 | - $result .= self::$waitingText; |
|
| 329 | + $result .= self::$waitingText; |
|
| 330 | 330 | self::$waitingText = ''; |
| 331 | 331 | } |
| 332 | 332 | break 2; // double break because we're waiting for more information |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | } |
| 458 | 458 | if (substr($result . "\n", 0, self::LENGTH_START) != self::START_LTR && substr($result . "\n", 0, self::LENGTH_START) != self::START_RTL) { |
| 459 | 459 | $leadingText .= substr($result, 0, 1); |
| 460 | - $result = substr($result, 1); |
|
| 460 | + $result = substr($result, 1); |
|
| 461 | 461 | continue; |
| 462 | 462 | } |
| 463 | 463 | $result = substr($result, 0, self::LENGTH_START) . $leadingText . substr($result, self::LENGTH_START); |
@@ -592,11 +592,11 @@ discard block |
||
| 592 | 592 | public static function breakCurrentSpan(&$result) |
| 593 | 593 | { |
| 594 | 594 | // Interrupt the current span, insert that <br>, and then continue the current span |
| 595 | - $result .= self::$waitingText; |
|
| 595 | + $result .= self::$waitingText; |
|
| 596 | 596 | self::$waitingText = ''; |
| 597 | 597 | |
| 598 | 598 | $breakString = '<' . self::$currentState . 'br>'; |
| 599 | - $result .= $breakString; |
|
| 599 | + $result .= $breakString; |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | /** |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | break; |
| 650 | 650 | } // No more numeric strings |
| 651 | 651 | |
| 652 | - $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string |
|
| 652 | + $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string |
|
| 653 | 653 | $numericString = substr($textSpan, $posLRE + 3, $posPDF - $posLRE); // Separate the entire numeric string |
| 654 | 654 | $textSpan = substr($textSpan, $posPDF + 3); |
| 655 | 655 | $posColon = strpos($numericString, ':'); |
@@ -1141,7 +1141,7 @@ discard block |
||
| 1141 | 1141 | while ($string) { |
| 1142 | 1142 | if (mb_strlen($string) <= $width) { |
| 1143 | 1143 | // Do not wrap any text that is less than the output area. |
| 1144 | - $out .= $string; |
|
| 1144 | + $out .= $string; |
|
| 1145 | 1145 | $string = ''; |
| 1146 | 1146 | } else { |
| 1147 | 1147 | $sub1 = mb_substr($string, 0, $width + 1); |
@@ -1155,7 +1155,7 @@ discard block |
||
| 1155 | 1155 | if ($spacepos === false) { |
| 1156 | 1156 | // No space on line? |
| 1157 | 1157 | if ($cut) { |
| 1158 | - $out .= $sub . $sep; |
|
| 1158 | + $out .= $sub . $sep; |
|
| 1159 | 1159 | $string = mb_substr($string, mb_strlen($sub)); |
| 1160 | 1160 | } else { |
| 1161 | 1161 | $spacepos = strpos($string, ' '); |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | } |
| 1170 | 1170 | } else { |
| 1171 | 1171 | // Split at space; |
| 1172 | - $out .= substr($string, 0, $spacepos) . $sep; |
|
| 1172 | + $out .= substr($string, 0, $spacepos) . $sep; |
|
| 1173 | 1173 | $string = substr($string, $spacepos + 1); |
| 1174 | 1174 | } |
| 1175 | 1175 | } |
@@ -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 |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } else { |
| 55 | 55 | $size = 75.0 + 125.0 * ($count - $minimum) / ($maximum - $minimum); |
| 56 | 56 | } |
| 57 | - $url = route($route, [ |
|
| 57 | + $url = route($route, [ |
|
| 58 | 58 | 'surname' => $surn, |
| 59 | 59 | 'ged' => $tree->getName(), |
| 60 | 60 | ]); |
@@ -131,13 +131,13 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | $newcol = ceil($count / $col); |
| 133 | 133 | $html2 = '<table class="list_table"><tr>'; |
| 134 | - $html2 .= '<td class="list_value" style="padding: 14px;">'; |
|
| 134 | + $html2 .= '<td class="list_value" style="padding: 14px;">'; |
|
| 135 | 135 | |
| 136 | 136 | foreach ($html as $surns) { |
| 137 | 137 | $html2 .= $surns . '<br>'; |
| 138 | 138 | $i++; |
| 139 | 139 | if ($i == $newcol && $i < $count) { |
| 140 | - $html2 .= '</td><td class="list_value" style="padding: 14px;">'; |
|
| 140 | + $html2 .= '</td><td class="list_value" style="padding: 14px;">'; |
|
| 141 | 141 | $newcol = $i + ceil($count / $col); |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -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 | * Copy§right (C) 2017 webtrees development team |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | if ($islink) { |
| 528 | 528 | $value = trim($value, '@'); |
| 529 | 529 | } else { |
| 530 | - $value = (string)substr($tag, strlen($fact) + 3); |
|
| 530 | + $value = (string) substr($tag, strlen($fact) + 3); |
|
| 531 | 531 | } |
| 532 | 532 | if ($fact === 'REPO' || $fact === 'SOUR' || $fact === 'OBJE' || $fact === 'FAMC') { |
| 533 | 533 | $islink = true; |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | $html .= '<p class="small text-muted">' . I18N::translate('Use this image for charts and on the individual’s page.') . '</p>'; |
| 813 | 813 | } elseif ($fact === 'TYPE' && $level === '3') { |
| 814 | 814 | //-- Build the selector for the Media 'TYPE' Fact |
| 815 | - $html .= '<select name="text[]"><option selected value="" ></option>'; |
|
| 815 | + $html .= '<select name="text[]"><option selected value="" ></option>'; |
|
| 816 | 816 | $selectedValue = strtolower($value); |
| 817 | 817 | if (!array_key_exists($selectedValue, GedcomTag::getFileFormTypes())) { |
| 818 | 818 | $html .= '<option selected value="' . e($value) . '" >' . e($value) . '</option>'; |
@@ -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 |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | break; |
| 66 | 66 | } |
| 67 | 67 | $newrec .= mb_substr($line, 0, $pos) . Gedcom::EOL; |
| 68 | - $line = $level . ' CONC ' . mb_substr($line, $pos); |
|
| 68 | + $line = $level . ' CONC ' . mb_substr($line, $pos); |
|
| 69 | 69 | } while (mb_strlen($line) > Gedcom::LINE_LENGTH); |
| 70 | 70 | } |
| 71 | 71 | $newrec .= $line . Gedcom::EOL; |
@@ -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 |
@@ -259,17 +259,17 @@ discard block |
||
| 259 | 259 | return false; |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | - $spouse_codes = [ |
|
| 262 | + $spouse_codes = [ |
|
| 263 | 263 | 'M' => 'hus', |
| 264 | 264 | 'F' => 'wif', |
| 265 | 265 | 'U' => 'spo', |
| 266 | 266 | ]; |
| 267 | - $parent_codes = [ |
|
| 267 | + $parent_codes = [ |
|
| 268 | 268 | 'M' => 'fat', |
| 269 | 269 | 'F' => 'mot', |
| 270 | 270 | 'U' => 'par', |
| 271 | 271 | ]; |
| 272 | - $child_codes = [ |
|
| 272 | + $child_codes = [ |
|
| 273 | 273 | 'M' => 'son', |
| 274 | 274 | 'F' => 'dau', |
| 275 | 275 | 'U' => 'chi', |
@@ -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 |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | "SELECT DISTINCT f_id AS xref, f_gedcom AS gedcom, d_type, d_day, d_month, d_year, d_fact" . |
| 225 | 225 | " FROM `##dates` JOIN `##families` ON d_gid = f_id AND d_file = f_file" . |
| 226 | 226 | " WHERE d_type = :type AND d_file = :tree_id"; |
| 227 | - $args = [ |
|
| 227 | + $args = [ |
|
| 228 | 228 | 'type' => $anniv->format('%@'), |
| 229 | 229 | 'tree_id' => $tree->getTreeId(), |
| 230 | 230 | ]; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $where .= " AND d_day = :day"; |
| 255 | 255 | $args['day'] = $anniv->d; |
| 256 | 256 | } |
| 257 | - $where .= " AND d_mon = :month"; |
|
| 257 | + $where .= " AND d_mon = :month"; |
|
| 258 | 258 | $args['month'] = $anniv->m; |
| 259 | 259 | } else { |
| 260 | 260 | // SPECIAL CASES: |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | } elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) { |
| 269 | 269 | $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2"; |
| 270 | 270 | } else { |
| 271 | - $where .= " AND d_day = :day AND d_mon = 2"; |
|
| 271 | + $where .= " AND d_day = :day AND d_mon = 2"; |
|
| 272 | 272 | $args['day'] = $anniv->d; |
| 273 | 273 | } |
| 274 | 274 | break; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) { |
| 292 | 292 | $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3"; |
| 293 | 293 | } else { |
| 294 | - $where .= " AND d_day = :day AND d_mon = 3"; |
|
| 294 | + $where .= " AND d_day = :day AND d_mon = 3"; |
|
| 295 | 295 | $args['day'] = $anniv->d; |
| 296 | 296 | } |
| 297 | 297 | break; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | // Only events in the past (includes dates without a year) |
| 349 | - $where .= " AND d_year <= :year"; |
|
| 349 | + $where .= " AND d_year <= :year"; |
|
| 350 | 350 | $args['year'] = $anniv->y; |
| 351 | 351 | |
| 352 | 352 | if ($facts) { |
@@ -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 |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $latest_version = $this->fetchLatestVersion(); |
| 76 | 76 | |
| 77 | - list(, , $url) = explode('|', $latest_version . '||'); |
|
| 77 | + list(,, $url) = explode('|', $latest_version . '||'); |
|
| 78 | 78 | |
| 79 | 79 | return $url; |
| 80 | 80 | } |
@@ -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 |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | */ |
| 450 | 450 | public function julianDay(): int |
| 451 | 451 | { |
| 452 | - return (int)(($this->minimumJulianDay() + $this->maximumJulianDay()) / 2); |
|
| 452 | + return (int) (($this->minimumJulianDay() + $this->maximumJulianDay()) / 2); |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | /** |