@@ -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): SharedNote|null; |
|
| 34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): SharedNote | 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 SharedNote |
| 55 | 55 | */ |
| 56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): SharedNote; |
|
| 56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): SharedNote; |
|
| 57 | 57 | } |
@@ -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 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | protected string $gedcom; |
| 78 | 78 | |
| 79 | 79 | // GEDCOM data (after any pending edits) |
| 80 | - protected string|null $pending; |
|
| 80 | + protected string | null $pending; |
|
| 81 | 81 | |
| 82 | 82 | /** @var array<Fact> Facts extracted from $gedcom/$pending */ |
| 83 | 83 | protected array $facts; |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | protected array $getAllNames = []; |
| 87 | 87 | |
| 88 | 88 | /** @var int|null Cached result */ |
| 89 | - private int|null $getPrimaryName = null; |
|
| 89 | + private int | null $getPrimaryName = null; |
|
| 90 | 90 | |
| 91 | 91 | /** @var int|null Cached result */ |
| 92 | - private int|null $getSecondaryName = null; |
|
| 92 | + private int | null $getSecondaryName = null; |
|
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * Create a GedcomRecord object from raw GEDCOM data. |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * empty string for records with pending deletions |
| 101 | 101 | * @param Tree $tree |
| 102 | 102 | */ |
| 103 | - public function __construct(string $xref, string $gedcom, string|null $pending, Tree $tree) |
|
| 103 | + public function __construct(string $xref, string $gedcom, string | null $pending, Tree $tree) |
|
| 104 | 104 | { |
| 105 | 105 | $this->xref = $xref; |
| 106 | 106 | $this->gedcom = $gedcom; |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * |
| 240 | 240 | * @return bool |
| 241 | 241 | */ |
| 242 | - public function canShow(int|null $access_level = null): bool |
|
| 242 | + public function canShow(int | null $access_level = null): bool |
|
| 243 | 243 | { |
| 244 | 244 | $access_level ??= Auth::accessLevel($this->tree); |
| 245 | 245 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * |
| 262 | 262 | * @return bool |
| 263 | 263 | */ |
| 264 | - public function canShowName(int|null $access_level = null): bool |
|
| 264 | + public function canShowName(int | null $access_level = null): bool |
|
| 265 | 265 | { |
| 266 | 266 | return $this->canShow($access_level); |
| 267 | 267 | } |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * |
| 424 | 424 | * @return void |
| 425 | 425 | */ |
| 426 | - public function setPrimaryName(int|null $n = null): void |
|
| 426 | + public function setPrimaryName(int | null $n = null): void |
|
| 427 | 427 | { |
| 428 | 428 | $this->getPrimaryName = $n; |
| 429 | 429 | $this->getSecondaryName = null; |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | * |
| 475 | 475 | * @return string|null |
| 476 | 476 | */ |
| 477 | - public function alternateName(): string|null |
|
| 477 | + public function alternateName(): string | null |
|
| 478 | 478 | { |
| 479 | 479 | if ($this->canShowName() && $this->getPrimaryName() !== $this->getSecondaryName()) { |
| 480 | 480 | $all_names = $this->getAllNames(); |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | public function facts( |
| 603 | 603 | array $filter = [], |
| 604 | 604 | bool $sort = false, |
| 605 | - int|null $access_level = null, |
|
| 605 | + int | null $access_level = null, |
|
| 606 | 606 | bool $ignore_deleted = false |
| 607 | 607 | ): Collection { |
| 608 | 608 | $access_level ??= Auth::accessLevel($this->tree); |