@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Create a individual. |
40 | 40 | */ |
41 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Media|null |
|
41 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Media | null |
|
42 | 42 | { |
43 | 43 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
44 | 44 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return Media |
79 | 79 | */ |
80 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Media |
|
80 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Media |
|
81 | 81 | { |
82 | 82 | return new Media($xref, $gedcom, $pending, $tree); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string|null |
92 | 92 | */ |
93 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
93 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
94 | 94 | { |
95 | 95 | return DB::table('media') |
96 | 96 | ->where('m_id', '=', $xref) |
@@ -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|null |
|
48 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Family | null |
|
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|null $pending, Tree $tree): Family |
|
95 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Family |
|
96 | 96 | { |
97 | 97 | return new Family($xref, $gedcom, $pending, $tree); |
98 | 98 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * |
106 | 106 | * @return string|null |
107 | 107 | */ |
108 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
108 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
109 | 109 | { |
110 | 110 | return DB::table('families') |
111 | 111 | ->where('f_id', '=', $xref) |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Create a header. |
40 | 40 | */ |
41 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Header|null |
|
41 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Header | null |
|
42 | 42 | { |
43 | 43 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
44 | 44 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return Header |
79 | 79 | */ |
80 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Header |
|
80 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Header |
|
81 | 81 | { |
82 | 82 | return new Header($xref, $gedcom, $pending, $tree); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string|null |
92 | 92 | */ |
93 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
93 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
94 | 94 | { |
95 | 95 | return DB::table('other') |
96 | 96 | ->where('o_id', '=', $xref) |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Create a repository. |
41 | 41 | */ |
42 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Repository|null |
|
42 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Repository | null |
|
43 | 43 | { |
44 | 44 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
45 | 45 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return Repository |
85 | 85 | */ |
86 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Repository |
|
86 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Repository |
|
87 | 87 | { |
88 | 88 | return new Repository($xref, $gedcom, $pending, $tree); |
89 | 89 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @return string|null |
98 | 98 | */ |
99 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
99 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
100 | 100 | { |
101 | 101 | return DB::table('other') |
102 | 102 | ->where('o_id', '=', $xref) |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Create a note. |
40 | 40 | */ |
41 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): SharedNote|null |
|
41 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): SharedNote | null |
|
42 | 42 | { |
43 | 43 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
44 | 44 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return SharedNote |
79 | 79 | */ |
80 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): SharedNote |
|
80 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): SharedNote |
|
81 | 81 | { |
82 | 82 | return new SharedNote($xref, $gedcom, $pending, $tree); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string|null |
92 | 92 | */ |
93 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
93 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
94 | 94 | { |
95 | 95 | return DB::table('other') |
96 | 96 | ->where('o_id', '=', $xref) |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * |
55 | 55 | * @throws InvalidGedcomEncodingException |
56 | 56 | */ |
57 | - public function detect(string $header): EncodingInterface|null |
|
57 | + public function detect(string $header): EncodingInterface | null |
|
58 | 58 | { |
59 | 59 | $utf_bom = [ |
60 | 60 | '/^' . UTF8::BYTE_ORDER_MARK . '/' => UTF8::NAME, |
@@ -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|null $string, string $format = 'Y-m-d H:i:s', UserInterface|null $user = null): TimestampInterface |
|
62 | + public function fromString(string | null $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 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | - private function findElementByWildcard(string $tag): ElementInterface|null |
|
74 | + private function findElementByWildcard(string $tag): ElementInterface | null |
|
75 | 75 | { |
76 | 76 | foreach ($this->elements as $tags => $element) { |
77 | 77 | if (str_contains($tags, '*')) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Create a submission. |
40 | 40 | */ |
41 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Submission|null |
|
41 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Submission | null |
|
42 | 42 | { |
43 | 43 | return Registry::cache()->array()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) { |
44 | 44 | $gedcom ??= $this->gedcom($xref, $tree); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return Submission |
79 | 79 | */ |
80 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Submission |
|
80 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Submission |
|
81 | 81 | { |
82 | 82 | return new Submission($xref, $gedcom, $pending, $tree); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string|null |
92 | 92 | */ |
93 | - protected function gedcom(string $xref, Tree $tree): string|null |
|
93 | + protected function gedcom(string $xref, Tree $tree): string | null |
|
94 | 94 | { |
95 | 95 | return DB::table('other') |
96 | 96 | ->where('o_id', '=', $xref) |