@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | |
| 697 | 697 | return strlen($module_name) <= 30; |
| 698 | 698 | }) |
| 699 | - ->map(static function (string $filename): ModuleCustomInterface|null { |
|
| 699 | + ->map(static function (string $filename): ModuleCustomInterface | null { |
|
| 700 | 700 | $module = self::load($filename); |
| 701 | 701 | |
| 702 | 702 | if ($module instanceof ModuleCustomInterface) { |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | /** |
| 715 | 715 | * Load a custom module in a static scope, to prevent it from modifying local or object variables. |
| 716 | 716 | */ |
| 717 | - private static function load(string $filename): ModuleInterface|null |
|
| 717 | + private static function load(string $filename): ModuleInterface | null |
|
| 718 | 718 | { |
| 719 | 719 | try { |
| 720 | 720 | return include $filename; |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | /** |
| 827 | 827 | * Find a specified module, if it is currently active. |
| 828 | 828 | */ |
| 829 | - public function findByName(string $module_name, bool $include_disabled = false): ModuleInterface|null |
|
| 829 | + public function findByName(string $module_name, bool $include_disabled = false): ModuleInterface | null |
|
| 830 | 830 | { |
| 831 | 831 | return $this->all($include_disabled) |
| 832 | 832 | ->first(static fn(ModuleInterface $module): bool => $module->name() === $module_name); |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * Find the user with a specified user_id. |
| 47 | 47 | */ |
| 48 | - public function find(int|null $user_id): User|null |
|
| 48 | + public function find(int | null $user_id): User | null |
|
| 49 | 49 | { |
| 50 | 50 | return Registry::cache()->array() |
| 51 | - ->remember('user-' . $user_id, static fn(): User|null => DB::table('user') |
|
| 51 | + ->remember('user-' . $user_id, static fn(): User | null => DB::table('user') |
|
| 52 | 52 | ->where('user_id', '=', $user_id) |
| 53 | 53 | ->get() |
| 54 | 54 | ->map(User::rowMapper()) |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | /** |
| 59 | 59 | * Find the user with a specified email address. |
| 60 | 60 | */ |
| 61 | - public function findByEmail(string $email): User|null |
|
| 61 | + public function findByEmail(string $email): User | null |
|
| 62 | 62 | { |
| 63 | 63 | return DB::table('user') |
| 64 | 64 | ->where('email', '=', $email) |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | /** |
| 71 | 71 | * Find the user with a specified user_name or email address. |
| 72 | 72 | */ |
| 73 | - public function findByIdentifier(string $identifier): User|null |
|
| 73 | + public function findByIdentifier(string $identifier): User | null |
|
| 74 | 74 | { |
| 75 | 75 | return DB::table('user') |
| 76 | 76 | ->where('user_name', '=', $identifier) |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | /** |
| 103 | 103 | * Find the user with a specified password reset token. |
| 104 | 104 | */ |
| 105 | - public function findByToken(string $token): User|null |
|
| 105 | + public function findByToken(string $token): User | null |
|
| 106 | 106 | { |
| 107 | 107 | return DB::table('user') |
| 108 | 108 | ->join('user_setting AS us1', 'us1.user_id', '=', 'user.user_id') |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | /** |
| 121 | 121 | * Find the user with a specified user_name. |
| 122 | 122 | */ |
| 123 | - public function findByUserName(string $user_name): User|null |
|
| 123 | + public function findByUserName(string $user_name): User | null |
|
| 124 | 124 | { |
| 125 | 125 | return DB::table('user') |
| 126 | 126 | ->where('user_name', '=', $user_name) |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | private static Translator $translator; |
| 211 | 211 | |
| 212 | - private static Collator|null $collator = null; |
|
| 212 | + private static Collator | null $collator = null; |
|
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | 215 | * The preferred locales for this site, or a default list if no preference. |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * |
| 249 | 249 | * @return string |
| 250 | 250 | */ |
| 251 | - public static function digits(string|int $n): string |
|
| 251 | + public static function digits(string | int $n): string |
|
| 252 | 252 | { |
| 253 | 253 | return self::$locale->digits((string) $n); |
| 254 | 254 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | * |
| 104 | 104 | * @return array<string>|null [nominative, genitive] or null |
| 105 | 105 | */ |
| 106 | - public function match(array $nodes, array $patterns): array|null |
|
| 106 | + public function match(array $nodes, array $patterns): array | null |
|
| 107 | 107 | { |
| 108 | 108 | $captures = []; |
| 109 | 109 | |
@@ -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): Note|null; |
|
| 34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Note | 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 Note |
| 55 | 55 | */ |
| 56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Note; |
|
| 56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Note; |
|
| 57 | 57 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @return TimestampInterface |
| 32 | 32 | */ |
| 33 | - public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface; |
|
| 33 | + public function make(int $timestamp, UserInterface | null $user = null): TimestampInterface; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * @param string|null $string YYYY-MM-DD HH:MM:SS (as provided by SQL). |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return TimestampInterface |
| 41 | 41 | */ |
| 42 | - public function fromString(string|null $string, string $format = 'Y-m-d H:i:s', UserInterface|null $user = null): TimestampInterface; |
|
| 42 | + public function fromString(string | null $string, string $format = 'Y-m-d H:i:s', UserInterface | null $user = null): TimestampInterface; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * @param UserInterface|null $user |
| 46 | 46 | * |
| 47 | 47 | * @return TimestampInterface |
| 48 | 48 | */ |
| 49 | - public function now(UserInterface|null $user = null): TimestampInterface; |
|
| 49 | + public function now(UserInterface | null $user = null): TimestampInterface; |
|
| 50 | 50 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Create a GedcomRecord object. |
| 33 | 33 | */ |
| 34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): GedcomRecord|null; |
|
| 34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): GedcomRecord | null; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Create a GedcomRecord object from raw GEDCOM data. |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return GedcomRecord |
| 46 | 46 | */ |
| 47 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): GedcomRecord; |
|
| 47 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): GedcomRecord; |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Create a GedcomRecord object from a row in the database. |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Create a family. |
| 33 | 33 | */ |
| 34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Family|null; |
|
| 34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Family | null; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Create a Family object from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @return Family |
| 55 | 55 | */ |
| 56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Family; |
|
| 56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Family; |
|
| 57 | 57 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Create a submission. |
| 33 | 33 | */ |
| 34 | - public function make(string $xref, Tree $tree, string|null $gedcom = null): Submission|null; |
|
| 34 | + public function make(string $xref, Tree $tree, string | null $gedcom = null): Submission | null; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Create a submission from a row in the database. |
@@ -53,5 +53,5 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @return Submission |
| 55 | 55 | */ |
| 56 | - public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): Submission; |
|
| 56 | + public function new(string $xref, string $gedcom, string | null $pending, Tree $tree): Submission; |
|
| 57 | 57 | } |