@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a source. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Source|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Source | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a source from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Source |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Source; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Source; |
|
57 | 57 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * Detect an encoding from a GEDCOM header record. |
31 | 31 | */ |
32 | - public function detect(string $header): EncodingInterface|null; |
|
32 | + public function detect(string $header): EncodingInterface | null; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Create a named encoding. |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a header. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Header|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Header | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a header from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Header |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Header; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Header; |
|
57 | 57 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create an individual. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Individual|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Individual | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create an individual from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Individual |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Individual; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Individual; |
|
57 | 57 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a submitter. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Submitter|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Submitter | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a submitter from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Submitter |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Submitter; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Submitter; |
|
57 | 57 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a repository. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Repository|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Repository | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a source from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Repository |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Repository; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Repository; |
|
57 | 57 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Create a Location. |
33 | 33 | */ |
34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Location|null; |
|
34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Location | null; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Create a Location from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Location |
55 | 55 | */ |
56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Location; |
|
56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Location; |
|
57 | 57 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @return bool |
57 | 57 | */ |
58 | - public static function isAdmin(UserInterface|null $user = null): bool |
|
58 | + public static function isAdmin(UserInterface | null $user = null): bool |
|
59 | 59 | { |
60 | 60 | $user ??= self::user(); |
61 | 61 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return bool |
72 | 72 | */ |
73 | - public static function isManager(Tree $tree, UserInterface|null $user = null): bool |
|
73 | + public static function isManager(Tree $tree, UserInterface | null $user = null): bool |
|
74 | 74 | { |
75 | 75 | $user ??= self::user(); |
76 | 76 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * |
86 | 86 | * @return bool |
87 | 87 | */ |
88 | - public static function isModerator(Tree $tree, UserInterface|null $user = null): bool |
|
88 | + public static function isModerator(Tree $tree, UserInterface | null $user = null): bool |
|
89 | 89 | { |
90 | 90 | $user ??= self::user(); |
91 | 91 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * |
103 | 103 | * @return bool |
104 | 104 | */ |
105 | - public static function isEditor(Tree $tree, UserInterface|null $user = null): bool |
|
105 | + public static function isEditor(Tree $tree, UserInterface | null $user = null): bool |
|
106 | 106 | { |
107 | 107 | $user ??= self::user(); |
108 | 108 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @return bool |
121 | 121 | */ |
122 | - public static function isMember(Tree $tree, UserInterface|null $user = null): bool |
|
122 | + public static function isMember(Tree $tree, UserInterface | null $user = null): bool |
|
123 | 123 | { |
124 | 124 | $user ??= self::user(); |
125 | 125 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * |
137 | 137 | * @return int |
138 | 138 | */ |
139 | - public static function accessLevel(Tree $tree, UserInterface|null $user = null): int |
|
139 | + public static function accessLevel(Tree $tree, UserInterface | null $user = null): int |
|
140 | 140 | { |
141 | 141 | $user ??= self::user(); |
142 | 142 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | /** |
155 | 155 | * The ID of the authenticated user, from the current session. |
156 | 156 | */ |
157 | - public static function id(): int|null |
|
157 | + public static function id(): int | null |
|
158 | 158 | { |
159 | 159 | $wt_user = Session::get('wt_user'); |
160 | 160 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | * @throws HttpNotFoundException |
222 | 222 | * @throws HttpAccessDeniedException |
223 | 223 | */ |
224 | - public static function checkFamilyAccess(Family|null $family, bool $edit = false): Family |
|
224 | + public static function checkFamilyAccess(Family | null $family, bool $edit = false): Family |
|
225 | 225 | { |
226 | 226 | $message = I18N::translate('This family does not exist or you do not have permission to view it.'); |
227 | 227 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | * @throws HttpNotFoundException |
251 | 251 | * @throws HttpAccessDeniedException |
252 | 252 | */ |
253 | - public static function checkHeaderAccess(Header|null $header, bool $edit = false): Header |
|
253 | + public static function checkHeaderAccess(Header | null $header, bool $edit = false): Header |
|
254 | 254 | { |
255 | 255 | $message = I18N::translate('This record does not exist or you do not have permission to view it.'); |
256 | 256 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | * @throws HttpNotFoundException |
281 | 281 | * @throws HttpAccessDeniedException |
282 | 282 | */ |
283 | - public static function checkIndividualAccess(Individual|null $individual, bool $edit = false, bool $chart = false): Individual |
|
283 | + public static function checkIndividualAccess(Individual | null $individual, bool $edit = false, bool $chart = false): Individual |
|
284 | 284 | { |
285 | 285 | $message = I18N::translate('This individual does not exist or you do not have permission to view it.'); |
286 | 286 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * @throws HttpNotFoundException |
314 | 314 | * @throws HttpAccessDeniedException |
315 | 315 | */ |
316 | - public static function checkLocationAccess(Location|null $location, bool $edit = false): Location |
|
316 | + public static function checkLocationAccess(Location | null $location, bool $edit = false): Location |
|
317 | 317 | { |
318 | 318 | $message = I18N::translate('This record does not exist or you do not have permission to view it.'); |
319 | 319 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * @throws HttpNotFoundException |
343 | 343 | * @throws HttpAccessDeniedException |
344 | 344 | */ |
345 | - public static function checkMediaAccess(Media|null $media, bool $edit = false): Media |
|
345 | + public static function checkMediaAccess(Media | null $media, bool $edit = false): Media |
|
346 | 346 | { |
347 | 347 | $message = I18N::translate('This media object does not exist or you do not have permission to view it.'); |
348 | 348 | |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | * @throws HttpNotFoundException |
372 | 372 | * @throws HttpAccessDeniedException |
373 | 373 | */ |
374 | - public static function checkNoteAccess(Note|null $note, bool $edit = false): Note |
|
374 | + public static function checkNoteAccess(Note | null $note, bool $edit = false): Note |
|
375 | 375 | { |
376 | 376 | $message = I18N::translate('This note does not exist or you do not have permission to view it.'); |
377 | 377 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * @throws HttpNotFoundException |
401 | 401 | * @throws HttpAccessDeniedException |
402 | 402 | */ |
403 | - public static function checkSharedNoteAccess(SharedNote|null $shared_note, bool $edit = false): SharedNote |
|
403 | + public static function checkSharedNoteAccess(SharedNote | null $shared_note, bool $edit = false): SharedNote |
|
404 | 404 | { |
405 | 405 | $message = I18N::translate('This note does not exist or you do not have permission to view it.'); |
406 | 406 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * @throws HttpNotFoundException |
430 | 430 | * @throws HttpAccessDeniedException |
431 | 431 | */ |
432 | - public static function checkRecordAccess(GedcomRecord|null $record, bool $edit = false): GedcomRecord |
|
432 | + public static function checkRecordAccess(GedcomRecord | null $record, bool $edit = false): GedcomRecord |
|
433 | 433 | { |
434 | 434 | $message = I18N::translate('This record does not exist or you do not have permission to view it.'); |
435 | 435 | |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | * @throws HttpNotFoundException |
459 | 459 | * @throws HttpAccessDeniedException |
460 | 460 | */ |
461 | - public static function checkRepositoryAccess(Repository|null $repository, bool $edit = false): Repository |
|
461 | + public static function checkRepositoryAccess(Repository | null $repository, bool $edit = false): Repository |
|
462 | 462 | { |
463 | 463 | $message = I18N::translate('This repository does not exist or you do not have permission to view it.'); |
464 | 464 | |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | * @throws HttpNotFoundException |
488 | 488 | * @throws HttpAccessDeniedException |
489 | 489 | */ |
490 | - public static function checkSourceAccess(Source|null $source, bool $edit = false): Source |
|
490 | + public static function checkSourceAccess(Source | null $source, bool $edit = false): Source |
|
491 | 491 | { |
492 | 492 | $message = I18N::translate('This source does not exist or you do not have permission to view it.'); |
493 | 493 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | * @throws HttpNotFoundException |
517 | 517 | * @throws HttpAccessDeniedException |
518 | 518 | */ |
519 | - public static function checkSubmitterAccess(Submitter|null $submitter, bool $edit = false): Submitter |
|
519 | + public static function checkSubmitterAccess(Submitter | null $submitter, bool $edit = false): Submitter |
|
520 | 520 | { |
521 | 521 | $message = I18N::translate('This record does not exist or you do not have permission to view it.'); |
522 | 522 | |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | * @throws HttpNotFoundException |
546 | 546 | * @throws HttpAccessDeniedException |
547 | 547 | */ |
548 | - public static function checkSubmissionAccess(Submission|null $submission, bool $edit = false): Submission |
|
548 | + public static function checkSubmissionAccess(Submission | null $submission, bool $edit = false): Submission |
|
549 | 549 | { |
550 | 550 | $message = I18N::translate('This record does not exist or you do not have permission to view it.'); |
551 | 551 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @return int|null |
73 | 73 | */ |
74 | - public function id(): int|null |
|
74 | + public function id(): int | null |
|
75 | 75 | { |
76 | 76 | // The "top-level" location won't exist in the database. |
77 | 77 | if ($this->parts->isEmpty()) { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | /** |
171 | 171 | * Latitude of the location. |
172 | 172 | */ |
173 | - public function latitude(): float|null |
|
173 | + public function latitude(): float | null |
|
174 | 174 | { |
175 | 175 | return $this->details()->latitude; |
176 | 176 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | /** |
179 | 179 | * Longitude of the location. |
180 | 180 | */ |
181 | - public function longitude(): float|null |
|
181 | + public function longitude(): float | null |
|
182 | 182 | { |
183 | 183 | return $this->details()->longitude; |
184 | 184 | } |