@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Location|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Location |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Location |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return Location |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Location |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Location |
|
| 87 | 87 | { |
| 88 | 88 | return new Location($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @return Repository|null |
| 47 | 47 | */ |
| 48 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Repository |
|
| 48 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Repository |
|
| 49 | 49 | { |
| 50 | 50 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 51 | 51 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return Repository |
| 91 | 91 | */ |
| 92 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Repository |
|
| 92 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Repository |
|
| 93 | 93 | { |
| 94 | 94 | return new Repository($xref, $gedcom, $pending, $tree); |
| 95 | 95 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Individual|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Individual |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Individual |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * |
| 83 | 83 | * @return Individual |
| 84 | 84 | */ |
| 85 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Individual |
|
| 85 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Individual |
|
| 86 | 86 | { |
| 87 | 87 | return new Individual($xref, $gedcom, $pending, $tree); |
| 88 | 88 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @return Family|null |
| 47 | 47 | */ |
| 48 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Family |
|
| 48 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Family |
|
| 49 | 49 | { |
| 50 | 50 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 51 | 51 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * |
| 93 | 93 | * @return Family |
| 94 | 94 | */ |
| 95 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Family |
|
| 95 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Family |
|
| 96 | 96 | { |
| 97 | 97 | return new Family($xref, $gedcom, $pending, $tree); |
| 98 | 98 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Media|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Media |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Media |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return Media |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Media |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Media |
|
| 87 | 87 | { |
| 88 | 88 | return new Media($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return Submission|null |
| 46 | 46 | */ |
| 47 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Submission |
|
| 47 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Submission |
|
| 48 | 48 | { |
| 49 | 49 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 50 | 50 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return Submission |
| 85 | 85 | */ |
| 86 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Submission |
|
| 86 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Submission |
|
| 87 | 87 | { |
| 88 | 88 | return new Submission($xref, $gedcom, $pending, $tree); |
| 89 | 89 | } |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | * |
| 44 | 44 | * @return TimestampInterface |
| 45 | 45 | */ |
| 46 | - public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface |
|
| 46 | + public function make(int $timestamp, UserInterface | null $user = null): TimestampInterface |
|
| 47 | 47 | { |
| 48 | - $user ??= Auth::user(); |
|
| 48 | + $user ??= Auth::user(); |
|
| 49 | 49 | $timezone = $user->getPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE')); |
| 50 | 50 | $locale = I18N::locale()->code(); |
| 51 | 51 | |
@@ -59,9 +59,9 @@ discard block |
||
| 59 | 59 | * |
| 60 | 60 | * @return TimestampInterface |
| 61 | 61 | */ |
| 62 | - public function fromString(?string $string, string $format = 'Y-m-d H:i:s', UserInterface|null $user = null): TimestampInterface |
|
| 62 | + public function fromString(?string $string, string $format = 'Y-m-d H:i:s', UserInterface | null $user = null): TimestampInterface |
|
| 63 | 63 | { |
| 64 | - $string ??= date($format); |
|
| 64 | + $string ??= date($format); |
|
| 65 | 65 | $timestamp = date_create_from_format($format, $string); |
| 66 | 66 | |
| 67 | 67 | if ($timestamp === false) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @return TimestampInterface |
| 78 | 78 | */ |
| 79 | - public function now(UserInterface|null $user = null): TimestampInterface |
|
| 79 | + public function now(UserInterface | null $user = null): TimestampInterface |
|
| 80 | 80 | { |
| 81 | 81 | return $this->make(time(), $user); |
| 82 | 82 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @return Source|null |
| 47 | 47 | */ |
| 48 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Source |
|
| 48 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Source |
|
| 49 | 49 | { |
| 50 | 50 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
| 51 | 51 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @return Source |
| 86 | 86 | */ |
| 87 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Source |
|
| 87 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Source |
|
| 88 | 88 | { |
| 89 | 89 | return new Source($xref, $gedcom, $pending, $tree); |
| 90 | 90 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return GedcomRecord|null |
| 54 | 54 | */ |
| 55 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?GedcomRecord |
|
| 55 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?GedcomRecord |
|
| 56 | 56 | { |
| 57 | 57 | // We know the type of the record. Return it directly. |
| 58 | 58 | if ($gedcom !== null && preg_match('/^0(?: @[^@]+@)? ([A-Z_]+)/', $gedcom, $match)) { |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * |
| 120 | 120 | * @return GedcomRecord |
| 121 | 121 | */ |
| 122 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): GedcomRecord |
|
| 122 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : GedcomRecord |
|
| 123 | 123 | { |
| 124 | 124 | return new GedcomRecord($xref, $gedcom, $pending, $tree); |
| 125 | 125 | } |