Passed
Pull Request — main (#5139)
by
unknown
07:08
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.
app/Http/Dispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     private static function reduceMiddleware(
54 54
         RequestHandlerInterface $carry,
55
-        string|MiddlewareInterface $item,
55
+        string | MiddlewareInterface $item,
56 56
     ): RequestHandlerInterface {
57 57
         return new readonly class (carry: $carry, item: $item) implements RequestHandlerInterface {
58 58
             /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
              */
61 61
             public function __construct(
62 62
                 private RequestHandlerInterface $carry,
63
-                private string|MiddlewareInterface $item,
63
+                private string | MiddlewareInterface $item,
64 64
             ) {
65 65
             }
66 66
 
Please login to merge, or discard this patch.
app/Services/LinkedRecordService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @return Collection<int,Family>
78 78
      */
79
-    public function linkedFamilies(GedcomRecord $record, string|null $link_type = null): Collection
79
+    public function linkedFamilies(GedcomRecord $record, string | null $link_type = null): Collection
80 80
     {
81 81
         $query = DB::table('families')
82 82
             ->join('link', static function (JoinClause $join): void {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * @return Collection<int,Individual>
104 104
      */
105
-    public function linkedIndividuals(GedcomRecord $record, string|null $link_type = null): Collection
105
+    public function linkedIndividuals(GedcomRecord $record, string | null $link_type = null): Collection
106 106
     {
107 107
         $query = DB::table('individuals')
108 108
             ->join('link', static function (JoinClause $join): void {
Please login to merge, or discard this patch.
app/Factories/SlugFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
  */
35 35
 class SlugFactory implements SlugFactoryInterface
36 36
 {
37
-    private Transliterator|null $transliterator = null;
37
+    private Transliterator | null $transliterator = null;
38 38
 
39 39
     public function __construct(private PhpService $php_service)
40 40
     {
Please login to merge, or discard this patch.
app/Http/Middleware/CompressResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         return $response;
95 95
     }
96 96
 
97
-    protected function compressionMethod(RequestInterface $request): string|null
97
+    protected function compressionMethod(RequestInterface $request): string | null
98 98
     {
99 99
         $accept_encoding = strtolower($request->getHeaderLine('accept-encoding'));
100 100
         $zlib_available  = $this->php_service->extensionLoaded(extension: 'zlib');
Please login to merge, or discard this patch.
app/Services/TimeoutService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
     public function __construct(
39 39
         private PhpService $php_service,
40
-        float|null $start_time = null,
40
+        float | null $start_time = null,
41 41
     ) {
42 42
         $this->start_time = $start_time ?? Registry::timeFactory()->now();
43 43
     }
Please login to merge, or discard this patch.
app/Cli/Commands/TreeList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
         return implode(separator: ',', array: $columns);
113 113
     }
114 114
 
115
-    private function quoteCsvValue(string|int $value): string
115
+    private function quoteCsvValue(string | int $value): string
116 116
     {
117 117
         return '"' . addcslashes(string: (string) $value, characters: '"') . '"';
118 118
     }
Please login to merge, or discard this patch.
app/Cli/Commands/UserList.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
             'real_name'  => $user->realName(),
72 72
             'email'      => $user->email(),
73 73
             'admin'      => $user->getPreference(setting_name: UserInterface::PREF_IS_ADMINISTRATOR) ? 'yes' : 'no',
74
-            'approved'   => $user->getPreference(setting_name: UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'yes' : 'no',
75
-            'verified'   => $user->getPreference(setting_name: UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'yes' : 'no',
76
-            'language'   => $user->getPreference(setting_name: UserInterface::PREF_LANGUAGE),
77
-            'timezone'   => $user->getPreference(setting_name: UserInterface::PREF_TIME_ZONE),
78
-            'contact'    => $user->getPreference(setting_name: UserInterface::PREF_CONTACT_METHOD),
79
-            'registered' => $this->formatTimestamp(timestamp: (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_REGISTERED)),
80
-            'last_login' => $this->formatTimestamp(timestamp: (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_ACTIVE)),
74
+            'approved'   => $user->getPreference(setting_name : UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'yes' : 'no',
75
+            'verified'   => $user->getPreference(setting_name : UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'yes' : 'no',
76
+            'language'   => $user->getPreference(setting_name : UserInterface::PREF_LANGUAGE),
77
+            'timezone'   => $user->getPreference(setting_name : UserInterface::PREF_TIME_ZONE),
78
+            'contact'    => $user->getPreference(setting_name : UserInterface::PREF_CONTACT_METHOD),
79
+            'registered' => $this->formatTimestamp(timestamp : (int) $user->getPreference(setting_name : UserInterface::PREF_TIMESTAMP_REGISTERED)),
80
+            'last_login' => $this->formatTimestamp(timestamp : (int) $user->getPreference(setting_name : UserInterface::PREF_TIMESTAMP_ACTIVE)),
81 81
         ])
82 82
         ->values()
83 83
         ->all();
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         return implode(separator: ',', array: $columns);
132 132
     }
133 133
 
134
-    private function quoteCsvValue(string|int $value): string
134
+    private function quoteCsvValue(string | int $value): string
135 135
     {
136 136
         return '"' . addcslashes(string: (string) $value, characters: '"') . '"';
137 137
     }
Please login to merge, or discard this patch.
app/DB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         return self::pdo()->getAttribute(PDO::ATTR_DRIVER_NAME);
142 142
     }
143 143
 
144
-    public static function exec(string $sql): int|false
144
+    public static function exec(string $sql): int | false
145 145
     {
146 146
         return self::pdo()->exec($sql);
147 147
     }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     /**
228 228
      * @return Expression<string>
229 229
      */
230
-    public static function binaryColumn(string $column, string|null $alias = null): Expression
230
+    public static function binaryColumn(string $column, string | null $alias = null): Expression
231 231
     {
232 232
         if (self::driverName() === self::MYSQL) {
233 233
             $sql = 'CAST(' . $column . ' AS binary)';
Please login to merge, or discard this patch.