@@ -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); |
@@ -344,7 +344,7 @@ |
||
| 344 | 344 | private function fetchIpRangesForAsn(string $asn): array |
| 345 | 345 | { |
| 346 | 346 | return Registry::cache()->file()->remember('whois-asn-' . $asn, static function () use ($asn): array { |
| 347 | - $mapper = static fn (AsnRouteInfo $route_info): RangeInterface|null => IPFactory::parseRangeString($route_info->route ?: $route_info->route6); |
|
| 347 | + $mapper = static fn (AsnRouteInfo $route_info): RangeInterface | null => IPFactory::parseRangeString($route_info->route ?: $route_info->route6); |
|
| 348 | 348 | |
| 349 | 349 | try { |
| 350 | 350 | $loader = new CurlLoader(self::WHOIS_TIMEOUT); |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | return $response; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - protected function compressionMethod(RequestInterface $request): string|null |
|
| 103 | + protected function compressionMethod(RequestInterface $request): string | null |
|
| 104 | 104 | { |
| 105 | 105 | $accept_encoding = strtolower($request->getHeaderLine('accept-encoding')); |
| 106 | 106 | $zlib_available = extension_loaded('zlib'); |
@@ -89,8 +89,8 @@ |
||
| 89 | 89 | |
| 90 | 90 | /** @var Collection<int,GedcomRecord> $records */ |
| 91 | 91 | $records = $rows |
| 92 | - ->map(fn(object $row): GedcomRecord|null => $this->data_fix_service->getRecordByType($row->xref, $tree, $row->type)) |
|
| 93 | - ->filter(static fn(GedcomRecord|null $record): bool => $record instanceof GedcomRecord && !$record->isPendingDeletion() && $module->doesRecordNeedUpdate($record, $params)); |
|
| 92 | + ->map(fn(object $row): GedcomRecord | null => $this->data_fix_service->getRecordByType($row->xref, $tree, $row->type)) |
|
| 93 | + ->filter(static fn(GedcomRecord | null $record): bool => $record instanceof GedcomRecord && !$record->isPendingDeletion() && $module->doesRecordNeedUpdate($record, $params)); |
|
| 94 | 94 | |
| 95 | 95 | foreach ($records as $record) { |
| 96 | 96 | $module->updateRecord($record, $params); |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | * |
| 70 | 70 | * @return object{id:string,year:int,fact:string,type:string}|null |
| 71 | 71 | */ |
| 72 | - private function eventQuery(string $fact, string $operation): object|null |
|
| 72 | + private function eventQuery(string $fact, string $operation): object | null |
|
| 73 | 73 | { |
| 74 | 74 | return DB::table('dates') |
| 75 | 75 | ->select(['d_gid as id', 'd_year as year', 'd_fact AS fact', 'd_type AS type']) |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | * |
| 219 | 219 | * @return object{id:string,year:int,fact:string,type:string}|null |
| 220 | 220 | */ |
| 221 | - private function eventQuery(string $direction): object|null |
|
| 221 | + private function eventQuery(string $direction): object | null |
|
| 222 | 222 | { |
| 223 | 223 | return DB::table('dates') |
| 224 | 224 | ->select(['d_gid as id', 'd_year as year', 'd_fact AS fact', 'd_type AS type']) |