Passed
Push — main ( 90da5d...11225d )
by Greg
18:24 queued 11:17
created
app/Elements/AbstractElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
      * @param string             $label
79 79
      * @param array<string>|null $subtags
80 80
      */
81
-    public function __construct(string $label, array|null $subtags = null)
81
+    public function __construct(string $label, array | null $subtags = null)
82 82
     {
83 83
         $this->label   = $label;
84 84
         $this->subtags = $subtags ?? static::SUBTAGS;
Please login to merge, or discard this patch.
app/Elements/NamePersonal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      * @param string             $label
90 90
      * @param array<string>|null $subtags
91 91
      */
92
-    public function __construct(string $label, array|null $subtags = null)
92
+    public function __construct(string $label, array | null $subtags = null)
93 93
     {
94 94
         if ($subtags === null && in_array(I18N::languageTag(), static::SURNAME_FIRST_LANGUAGES, true)) {
95 95
             $subtags = static::SUBTAGS_SURNAME_FIRST;
Please login to merge, or discard this patch.
app/Individual.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @return bool
84 84
      */
85
-    public function canShowName(int|null $access_level = null): bool
85
+    public function canShowName(int | null $access_level = null): bool
86 86
     {
87 87
         $access_level ??= Auth::accessLevel($this->tree);
88 88
 
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
      *
704 704
      * @return Collection<int,Family>
705 705
      */
706
-    public function spouseFamilies(int|null $access_level = null): Collection
706
+    public function spouseFamilies(int | null $access_level = null): Collection
707 707
     {
708 708
         $access_level ??= Auth::accessLevel($this->tree);
709 709
 
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      *
770 770
      * @return Collection<int,Family>
771 771
      */
772
-    public function childFamilies(int|null $access_level = null): Collection
772
+    public function childFamilies(int | null $access_level = null): Collection
773 773
     {
774 774
         $access_level ??= Auth::accessLevel($this->tree);
775 775
 
Please login to merge, or discard this patch.
app/Http/Exceptions/HttpAccessDeniedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * @param string|null $message
32 32
      */
33
-    public function __construct(string|null $message = null)
33
+    public function __construct(string | null $message = null)
34 34
     {
35 35
         $message ??= I18N::translate('You do not have permission to view this page.');
36 36
 
Please login to merge, or discard this patch.
app/Http/Exceptions/HttpTooManyRequestsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * @param string|null $message
32 32
      */
33
-    public function __construct(string|null $message = null)
33
+    public function __construct(string | null $message = null)
34 34
     {
35 35
         $message ??= I18N::translate('Too many requests. Try again later.');
36 36
 
Please login to merge, or discard this patch.
app/Http/Exceptions/HttpGoneException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * @param string|null $message
32 32
      */
33
-    public function __construct(string|null $message = null)
33
+    public function __construct(string | null $message = null)
34 34
     {
35 35
         $message ??= I18N::translate('This page has been deleted.');
36 36
 
Please login to merge, or discard this patch.
app/Http/Exceptions/HttpBadRequestException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * @param string|null $message
32 32
      */
33
-    public function __construct(string|null $message = null)
33
+    public function __construct(string | null $message = null)
34 34
     {
35 35
         $message ??= I18N::translate('The server could not understand this request.');
36 36
 
Please login to merge, or discard this patch.
app/Date.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      *
99 99
      * @return string
100 100
      */
101
-    public function display(Tree|null $tree = null, string|null $date_format = null, bool $convert_calendars = false): string
101
+    public function display(Tree | null $tree = null, string | null $date_format = null, bool $convert_calendars = false): string
102 102
     {
103 103
         if ($tree instanceof Tree) {
104 104
             $CALENDAR_FORMAT = $tree->getPreference('CALENDAR_FORMAT');
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     public function addYears(int $years, string $qualifier = ''): Date
304 304
     {
305 305
         $tmp               = clone $this;
306
-        $tmp->date1->year  += $years;
306
+        $tmp->date1->year += $years;
307 307
         $tmp->date1->month = 0;
308 308
         $tmp->date1->day   = 0;
309 309
         $tmp->date1->setJdFromYmd();
Please login to merge, or discard this patch.
app/Validator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function isBetween(int $minimum, int $maximum): self
127 127
     {
128
-        $this->rules[] = static function (?int $value) use ($minimum, $maximum): ?int {
128
+        $this->rules[] = static function (?int $value) use ($minimum, $maximum) : ?int {
129 129
             if (is_int($value) && $value >= $minimum && $value <= $maximum) {
130 130
                 return $value;
131 131
             }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function isInArray(array $values): self
145 145
     {
146
-        $this->rules[] = static fn (int|string|null $value): int|string|null => in_array($value, $values, true) ? $value : null;
146
+        $this->rules[] = static fn (int | string | null $value): int | string | null => in_array($value, $values, true) ? $value : null;
147 147
 
148 148
         return $this;
149 149
     }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function isNotEmpty(): self
165 165
     {
166
-        $this->rules[] = static fn (?string $value): ?string => $value !== null && $value !== '' ? $value : null;
166
+        $this->rules[] = static fn (?string $value) : ?string => $value !== null && $value !== '' ? $value : null;
167 167
 
168 168
         return $this;
169 169
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $base_url = $this->request->getAttribute('base_url', '');
177 177
 
178
-        $this->rules[] = static function (?string $value) use ($base_url): ?string {
178
+        $this->rules[] = static function (?string $value) use ($base_url) : ?string {
179 179
             if ($value !== null) {
180 180
                 $value_info    = parse_url($value);
181 181
                 $base_url_info = parse_url($base_url);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      *
248 248
      * @return bool
249 249
      */
250
-    public function boolean(string $parameter, bool|null $default = null): bool
250
+    public function boolean(string $parameter, bool | null $default = null): bool
251 251
     {
252 252
         $value = $this->parameters[$parameter] ?? null;
253 253
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             throw new HttpBadRequestException(I18N::translate('The parameter ā€œ%sā€ is missing.', $parameter));
280 280
         }
281 281
 
282
-        $callback = static fn (?array $value, Closure $rule): ?array => $rule($value);
282
+        $callback = static fn (?array $value, Closure $rule) : ?array => $rule($value);
283 283
 
284 284
         return array_reduce($this->rules, $callback, $value) ?? [];
285 285
     }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      *
291 291
      * @return float
292 292
      */
293
-    public function float(string $parameter, float|null $default = null): float
293
+    public function float(string $parameter, float | null $default = null): float
294 294
     {
295 295
         $value = $this->parameters[$parameter] ?? null;
296 296
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             $value = null;
301 301
         }
302 302
 
303
-        $callback = static fn (?float $value, Closure $rule): ?float => $rule($value);
303
+        $callback = static fn (?float $value, Closure $rule) : ?float => $rule($value);
304 304
 
305 305
         $value = array_reduce($this->rules, $callback, $value) ?? $default;
306 306
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      *
318 318
      * @return int
319 319
      */
320
-    public function integer(string $parameter, int|null $default = null): int
320
+    public function integer(string $parameter, int | null $default = null): int
321 321
     {
322 322
         $value = $this->parameters[$parameter] ?? null;
323 323
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             $value = null;
334 334
         }
335 335
 
336
-        $callback = static fn (?int $value, Closure $rule): ?int => $rule($value);
336
+        $callback = static fn (?int $value, Closure $rule) : ?int => $rule($value);
337 337
 
338 338
         $value = array_reduce($this->rules, $callback, $value) ?? $default;
339 339
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      *
367 367
      * @return string
368 368
      */
369
-    public function string(string $parameter, string|null $default = null): string
369
+    public function string(string $parameter, string | null $default = null): string
370 370
     {
371 371
         $value = $this->parameters[$parameter] ?? null;
372 372
 
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
             $value = null;
375 375
         }
376 376
 
377
-        $callback = static fn (?string $value, Closure $rule): ?string => $rule($value);
377
+        $callback = static fn (?string $value, Closure $rule) : ?string => $rule($value);
378 378
 
379
-        $value =  array_reduce($this->rules, $callback, $value) ?? $default;
379
+        $value = array_reduce($this->rules, $callback, $value) ?? $default;
380 380
 
381 381
         if ($value === null) {
382 382
             throw new HttpBadRequestException(I18N::translate('The parameter ā€œ%sā€ is missing.', $parameter));
Please login to merge, or discard this patch.