@@ -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 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return SharedNote|null |
39 | 39 | */ |
40 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?SharedNote; |
|
40 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?SharedNote; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Create a note from a row in the database. |
@@ -59,5 +59,5 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return SharedNote |
61 | 61 | */ |
62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): SharedNote; |
|
62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : SharedNote; |
|
63 | 63 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return GedcomRecord|null |
39 | 39 | */ |
40 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?GedcomRecord; |
|
40 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?GedcomRecord; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Create a GedcomRecord object from raw GEDCOM data. |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @return GedcomRecord |
52 | 52 | */ |
53 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): GedcomRecord; |
|
53 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : GedcomRecord; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Create a GedcomRecord object from a row in the database. |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return Repository|null |
39 | 39 | */ |
40 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Repository; |
|
40 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Repository; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Create a source from a row in the database. |
@@ -59,5 +59,5 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return Repository |
61 | 61 | */ |
62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Repository; |
|
62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Repository; |
|
63 | 63 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return Family|null |
39 | 39 | */ |
40 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Family; |
|
40 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Family; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Create a Family object from a row in the database. |
@@ -59,5 +59,5 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return Family |
61 | 61 | */ |
62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Family; |
|
62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Family; |
|
63 | 63 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return Header|null |
39 | 39 | */ |
40 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): ?Header; |
|
40 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): ?Header; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Create a header from a row in the database. |
@@ -59,5 +59,5 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return Header |
61 | 61 | */ |
62 | - public function new(string $xref, string $gedcom, ?string $pending, Tree $tree): Header; |
|
62 | + public function new(string $xref, string $gedcom, ?string $pending, Tree $tree) : Header; |
|
63 | 63 | } |