Passed
Push — main ( 67c84e...cdec4d )
by Greg
06:18
created
app/GedcomRecord.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     protected string $gedcom;
79 79
 
80 80
     // GEDCOM data (after any pending edits)
81
-    protected string|null $pending;
81
+    protected string | null $pending;
82 82
 
83 83
     /** @var array<Fact> Facts extracted from $gedcom/$pending */
84 84
     protected array $facts;
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
     protected array $getAllNames = [];
88 88
 
89 89
     /** @var int|null Cached result */
90
-    private int|null $getPrimaryName = null;
90
+    private int | null $getPrimaryName = null;
91 91
 
92 92
     /** @var int|null Cached result */
93
-    private int|null $getSecondaryName = null;
93
+    private int | null $getSecondaryName = null;
94 94
 
95 95
     /**
96 96
      * Create a GedcomRecord object from raw GEDCOM data.
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      *                             empty string for records with pending deletions
102 102
      * @param Tree        $tree
103 103
      */
104
-    public function __construct(string $xref, string $gedcom, string|null $pending, Tree $tree)
104
+    public function __construct(string $xref, string $gedcom, string | null $pending, Tree $tree)
105 105
     {
106 106
         $this->xref    = $xref;
107 107
         $this->gedcom  = $gedcom;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      *
241 241
      * @return bool
242 242
      */
243
-    public function canShow(int|null $access_level = null): bool
243
+    public function canShow(int | null $access_level = null): bool
244 244
     {
245 245
         $access_level ??= Auth::accessLevel($this->tree);
246 246
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      *
263 263
      * @return bool
264 264
      */
265
-    public function canShowName(int|null $access_level = null): bool
265
+    public function canShowName(int | null $access_level = null): bool
266 266
     {
267 267
         return $this->canShow($access_level);
268 268
     }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
         }
313 313
 
314 314
         // Remove links to missing and private records
315
-        $pattern =  '/\n(\d) ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@/';
315
+        $pattern = '/\n(\d) ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@/';
316 316
         preg_match_all($pattern, $gedcom, $matches, PREG_SET_ORDER);
317 317
 
318 318
         foreach ($matches as $match) {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
      *
433 433
      * @return void
434 434
      */
435
-    public function setPrimaryName(int|null $n = null): void
435
+    public function setPrimaryName(int | null $n = null): void
436 436
     {
437 437
         $this->getPrimaryName   = $n;
438 438
         $this->getSecondaryName = null;
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      *
484 484
      * @return string|null
485 485
      */
486
-    public function alternateName(): string|null
486
+    public function alternateName(): string | null
487 487
     {
488 488
         if ($this->canShowName() && $this->getPrimaryName() !== $this->getSecondaryName()) {
489 489
             $all_names = $this->getAllNames();
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
     public function facts(
612 612
         array $filter = [],
613 613
         bool $sort = false,
614
-        int|null $access_level = null,
614
+        int | null $access_level = null,
615 615
         bool $ignore_deleted = false
616 616
     ): Collection {
617 617
         $access_level ??= Auth::accessLevel($this->tree);
Please login to merge, or discard this patch.