@@ -301,7 +301,7 @@ |
||
301 | 301 | { |
302 | 302 | $latest_version = $this->fetchLatestVersion(false); |
303 | 303 | |
304 | - [, , $url] = explode('|', $latest_version . '||'); |
|
304 | + [,, $url] = explode('|', $latest_version . '||'); |
|
305 | 305 | |
306 | 306 | return $url; |
307 | 307 | } |
@@ -114,7 +114,7 @@ |
||
114 | 114 | |
115 | 115 | // Only update session once a minute to reduce contention on the session table. |
116 | 116 | if ($now->subtractMinutes(1)->timestamp() > Registry::timestampFactory()->fromString($this->row->session_time)->timestamp()) { |
117 | - $updates['session_time'] = $now->toDateTimeString(); |
|
117 | + $updates['session_time'] = $now->toDateTimeString(); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | if ($updates !== []) { |
@@ -1138,7 +1138,7 @@ |
||
1138 | 1138 | $value = str_replace("\n", "<br>", $value); |
1139 | 1139 | //$value = strip_tags(Registry::markdownFactory()->autolink($value, $this->tree), ['br']); |
1140 | 1140 | } |
1141 | - $value = strtr($value, [MarkdownFactory::BREAK => ' ']); |
|
1141 | + $value = strtr($value, [MarkdownFactory::break => ' ']); |
|
1142 | 1142 | } |
1143 | 1143 | |
1144 | 1144 | if (isset($attrs['lcfirst'])) { |
@@ -1021,7 +1021,7 @@ discard block |
||
1021 | 1021 | $this->current_element->addText(I18N::translate('Private')); |
1022 | 1022 | } elseif ($nameselect == 'latest') { |
1023 | 1023 | $tmp = $record->getAllNames(); |
1024 | - $name = strip_tags($tmp[count($tmp) - 1]['full']); |
|
1024 | + $name = strip_tags($tmp[count($tmp) - 1]['full']); |
|
1025 | 1025 | $this->current_element->addText(trim($name)); |
1026 | 1026 | } elseif ($nameselect == 'combined') { |
1027 | 1027 | $tmp = $record->getAllNames(); |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | $value = $this->getGedcomValue($tag, $level, $this->gedrec); |
1103 | 1103 | switch (end($tags)) { |
1104 | 1104 | case 'DATE': |
1105 | - $tmp = new Date($value); |
|
1105 | + $tmp = new Date($value); |
|
1106 | 1106 | $dfmt = "%j %F %Y"; |
1107 | 1107 | if (!empty($attrs['truncate'])) { |
1108 | 1108 | if ($attrs['truncate'] === "d") { |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | |
1143 | 1143 | if (isset($attrs['lcfirst'])) { |
1144 | 1144 | $value = lcfirst($value); |
1145 | - $value = str_replace(["Å","Ä","Ö"], ["å","ä","ö"], $value); |
|
1145 | + $value = str_replace(["Å", "Ä", "Ö"], ["å", "ä", "ö"], $value); |
|
1146 | 1146 | } |
1147 | 1147 | |
1148 | 1148 | if (!empty($attrs['truncate'])) { |
@@ -1028,10 +1028,12 @@ discard block |
||
1028 | 1028 | $tmp = $record->getAllNames(); |
1029 | 1029 | $name = $tmp[count($tmp) - 1]['full']; |
1030 | 1030 | $ix1 = strpos($name, '<span class="starredname">'); |
1031 | - if ($ix1 !== false) { // '«' and '»' mark text for underlining |
|
1031 | + if ($ix1 !== false) { |
|
1032 | +// '«' and '»' mark text for underlining |
|
1032 | 1033 | $name = substr_replace($name, '«', $ix1, 26); |
1033 | 1034 | $ix1 = strpos($name, '</span>', $ix1); |
1034 | - if ($ix1 !== false) { // '«' and '»' mark text for underlining |
|
1035 | + if ($ix1 !== false) { |
|
1036 | +// '«' and '»' mark text for underlining |
|
1035 | 1037 | $name = substr_replace($name, '»', $ix1, 7); |
1036 | 1038 | } |
1037 | 1039 | } |
@@ -1508,7 +1510,8 @@ discard block |
||
1508 | 1510 | // Sort facts in chronological order, if possible |
1509 | 1511 | $m = count($this->repeats) - 1; |
1510 | 1512 | $prevd = 0; |
1511 | - for ($i = 0; $i <= $m; $i++) { // keep undated events after previous dated event |
|
1513 | + for ($i = 0; $i <= $m; $i++) { |
|
1514 | +// keep undated events after previous dated event |
|
1512 | 1515 | if ($jdarr[$i] === 0) { |
1513 | 1516 | $jdarr[$i] = $prevd; |
1514 | 1517 | } else { |
@@ -1762,7 +1765,8 @@ discard block |
||
1762 | 1765 | } elseif (preg_match('/^I18N::translateContext\(\'(.+)\', *\'(.+)\'\)$/', $value, $match)) { |
1763 | 1766 | $value = I18N::translateContext($match[1], $match[2]); |
1764 | 1767 | } |
1765 | - if (isset($attrs['lcfirst'])) { // set 1st char to lower case |
|
1768 | + if (isset($attrs['lcfirst'])) { |
|
1769 | +// set 1st char to lower case |
|
1766 | 1770 | $value = lcfirst($value); |
1767 | 1771 | } |
1768 | 1772 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @return string |
34 | 34 | */ |
35 | - public function autolink(string $markdown, Tree|null $tree = null): string; |
|
35 | + public function autolink(string $markdown, Tree | null $tree = null): string; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @param string $markdown |
@@ -40,5 +40,5 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return string |
42 | 42 | */ |
43 | - public function markdown(string $markdown, Tree|null $tree = null): string; |
|
43 | + public function markdown(string $markdown, Tree | null $tree = null): string; |
|
44 | 44 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | * @param string $label |
79 | 79 | * @param array<string>|null $subtags |
80 | 80 | */ |
81 | - public function __construct(string $label, array|null $subtags = null) |
|
81 | + public function __construct(string $label, array | null $subtags = null) |
|
82 | 82 | { |
83 | 83 | $this->label = $label; |
84 | 84 | $this->subtags = $subtags ?? static::SUBTAGS; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * @param string $label |
90 | 90 | * @param array<string>|null $subtags |
91 | 91 | */ |
92 | - public function __construct(string $label, array|null $subtags = null) |
|
92 | + public function __construct(string $label, array | null $subtags = null) |
|
93 | 93 | { |
94 | 94 | if ($subtags === null && in_array(I18N::languageTag(), static::SURNAME_FIRST_LANGUAGES, true)) { |
95 | 95 | $subtags = static::SUBTAGS_SURNAME_FIRST; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @param string|null $message |
32 | 32 | */ |
33 | - public function __construct(string|null $message = null) |
|
33 | + public function __construct(string | null $message = null) |
|
34 | 34 | { |
35 | 35 | $message ??= I18N::translate('You do not have permission to view this page.'); |
36 | 36 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @param string|null $message |
32 | 32 | */ |
33 | - public function __construct(string|null $message = null) |
|
33 | + public function __construct(string | null $message = null) |
|
34 | 34 | { |
35 | 35 | $message ??= I18N::translate('Too many requests. Try again later.'); |
36 | 36 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @param string|null $message |
32 | 32 | */ |
33 | - public function __construct(string|null $message = null) |
|
33 | + public function __construct(string | null $message = null) |
|
34 | 34 | { |
35 | 35 | $message ??= I18N::translate('This page has been deleted.'); |
36 | 36 |