@@ -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 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param array<string>|int|AbstractCalendarDate $date |
82 | 82 | */ |
83 | - public function __construct(array|int|AbstractCalendarDate $date) |
|
83 | + public function __construct(array | int | AbstractCalendarDate $date) |
|
84 | 84 | { |
85 | 85 | // Construct from an integer (a julian day number) |
86 | 86 | if (is_int($date)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->month = static::MONTH_TO_NUMBER[$date[1]] ?? 0; |
98 | 98 | |
99 | 99 | if ($this->month === 0) { |
100 | - $this->day = 0; |
|
100 | + $this->day = 0; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $this->year = $this->extractYear($date[0]); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** |
43 | 43 | * @param UploadedFileInterface|null $uploaded_file |
44 | 44 | */ |
45 | - public function __construct(UploadedFileInterface|null $uploaded_file) |
|
45 | + public function __construct(UploadedFileInterface | null $uploaded_file) |
|
46 | 46 | { |
47 | 47 | if ($uploaded_file === null) { |
48 | 48 | parent::__construct(I18N::translate('No file was received. Please try again.')); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | /** |
47 | 47 | * Since we know the type, this is quicker than calling Registry::gedcomRecordFactory()->make(). |
48 | 48 | */ |
49 | - public function getRecordByType(string $xref, Tree $tree, string $type): GedcomRecord|null |
|
49 | + public function getRecordByType(string $xref, Tree $tree, string $type): GedcomRecord | null |
|
50 | 50 | { |
51 | 51 | switch ($type) { |
52 | 52 | case Family::RECORD_TYPE: |
@@ -174,17 +174,17 @@ |
||
174 | 174 | return $tag; |
175 | 175 | } |
176 | 176 | |
177 | - public function readLatitude(string $text): float|null |
|
177 | + public function readLatitude(string $text): float | null |
|
178 | 178 | { |
179 | 179 | return $this->readDegrees($text, Gedcom::LATITUDE_NORTH, Gedcom::LATITUDE_SOUTH); |
180 | 180 | } |
181 | 181 | |
182 | - public function readLongitude(string $text): float|null |
|
182 | + public function readLongitude(string $text): float | null |
|
183 | 183 | { |
184 | 184 | return $this->readDegrees($text, Gedcom::LONGITUDE_EAST, Gedcom::LONGITUDE_WEST); |
185 | 185 | } |
186 | 186 | |
187 | - private function readDegrees(string $text, string $positive, string $negative): float|null |
|
187 | + private function readDegrees(string $text, string $positive, string $negative): float | null |
|
188 | 188 | { |
189 | 189 | $text = trim($text); |
190 | 190 | $hemisphere = substr($text, 0, 1); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | private static Translator $translator; |
211 | 211 | |
212 | - private static Collator|null $collator = null; |
|
212 | + private static Collator | null $collator = null; |
|
213 | 213 | |
214 | 214 | /** |
215 | 215 | * The preferred locales for this site, or a default list if no preference. |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * |
249 | 249 | * @return string |
250 | 250 | */ |
251 | - public static function digits(string|int $n): string |
|
251 | + public static function digits(string | int $n): string |
|
252 | 252 | { |
253 | 253 | return self::$locale->digits((string) $n); |
254 | 254 | } |
@@ -103,7 +103,7 @@ |
||
103 | 103 | * |
104 | 104 | * @return array<string>|null [nominative, genitive] or null |
105 | 105 | */ |
106 | - public function match(array $nodes, array $patterns): array|null |
|
106 | + public function match(array $nodes, array $patterns): array | null |
|
107 | 107 | { |
108 | 108 | $captures = []; |
109 | 109 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a note. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Note|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Note | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a note from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Note |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Note; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Note; |
|
57 | 57 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return TimestampInterface |
32 | 32 | */ |
33 | - public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface; |
|
33 | + public function make(int $timestamp, UserInterface | null $user = null): TimestampInterface; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param string|null $string YYYY-MM-DD HH:MM:SS (as provided by SQL). |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return TimestampInterface |
41 | 41 | */ |
42 | - public function fromString(string|null $string, string $format = 'Y-m-d H:i:s', UserInterface|null $user = null): TimestampInterface; |
|
42 | + public function fromString(string | null $string, string $format = 'Y-m-d H:i:s', UserInterface | null $user = null): TimestampInterface; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @param UserInterface|null $user |
46 | 46 | * |
47 | 47 | * @return TimestampInterface |
48 | 48 | */ |
49 | - public function now(UserInterface|null $user = null): TimestampInterface; |
|
49 | + public function now(UserInterface | null $user = null): TimestampInterface; |
|
50 | 50 | } |