Passed
Push — main ( 950f85...4bfa5d )
by Greg
07:33
created
app/Validator.php 1 patch
Spacing   +15 added lines, -15 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|null $value) use ($minimum, $maximum): int|null {
128
+        $this->rules[] = static function (int | null $value) use ($minimum, $maximum): int | null {
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|null $value): string|null => $value !== null && $value !== '' ? $value : null;
166
+        $this->rules[] = static fn (string | null $value): string | null => $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|null $value) use ($base_url): string|null {
178
+        $this->rules[] = static function (string | null $value) use ($base_url): string | null {
179 179
             if ($value !== null) {
180 180
                 $value_info    = parse_url($value);
181 181
                 $base_url_info = parse_url($base_url);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function isTag(): self
206 206
     {
207
-        $this->rules[] = static function (string|null $value): string|null {
207
+        $this->rules[] = static function (string | null $value): string | null {
208 208
             if ($value !== null && preg_match('/^' . Gedcom::REGEX_TAG . '$/', $value) === 1) {
209 209
                 return $value;
210 210
             }
@@ -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|null $value, Closure $rule): array|null => $rule($value);
282
+        $callback = static fn (array | null $value, Closure $rule): array | null => $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|null $value, Closure $rule): float|null => $rule($value);
303
+        $callback = static fn (float | null $value, Closure $rule): float | null => $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|null $value, Closure $rule): int|null => $rule($value);
336
+        $callback = static fn (int | null $value, Closure $rule): int | null => $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|null $value, Closure $rule): string|null => $rule($value);
377
+        $callback = static fn (string | null $value, Closure $rule): string | null => $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));
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter));
402 402
     }
403 403
 
404
-    public function treeOptional(string $parameter = 'tree'): Tree|null
404
+    public function treeOptional(string $parameter = 'tree'): Tree | null
405 405
     {
406 406
         $value = $this->parameters[$parameter] ?? null;
407 407
 
Please login to merge, or discard this patch.
app/StatisticsData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $rows = $query
102 102
             ->groupBy(['n_givn'])
103 103
             ->pluck(new Expression('COUNT(DISTINCT n_id)'), 'n_givn')
104
-            ->map(static fn (int|string $count): int => (int) $count);
104
+            ->map(static fn (int | string $count): int => (int) $count);
105 105
 
106 106
 
107 107
         $given_names = [];
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
      *
785 785
      * @return object{id:string,year:int,fact:string,type:string}|null
786 786
      */
787
-    private function firstEvent(array $events, bool $ascending): object|null
787
+    private function firstEvent(array $events, bool $ascending): object | null
788 788
     {
789 789
         if ($events === []) {
790 790
             $events = [
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
             ->orderBy('d_julianday1', $ascending ? 'ASC' : 'DESC')
804 804
             ->limit(1)
805 805
             ->get()
806
-            ->map(static fn (object $row): object => (object) [
806
+            ->map(static fn (object $row) : object => (object) [
807 807
                 'id'   => $row->id,
808 808
                 'year' => (int) $row->year,
809 809
                 'fact' => $row->fact,
@@ -916,14 +916,14 @@  discard block
 block discarded – undo
916 916
         return $date->display();
917 917
     }
918 918
 
919
-    public function isUserLoggedIn(int|null $user_id): bool
919
+    public function isUserLoggedIn(int | null $user_id): bool
920 920
     {
921 921
         return $user_id !== null && DB::table('session')
922 922
             ->where('user_id', '=', $user_id)
923 923
             ->exists();
924 924
     }
925 925
 
926
-    public function latestUserId(): int|null
926
+    public function latestUserId(): int | null
927 927
     {
928 928
         $user_id = DB::table('user')
929 929
             ->select(['user.user_id'])
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
     /**
1136 1136
      * @return object{individual:Individual,days:int}|null
1137 1137
      */
1138
-    public function longlifeQuery(string $sex): object|null
1138
+    public function longlifeQuery(string $sex): object | null
1139 1139
     {
1140 1140
         return $this->birthAndDeathQuery($sex)
1141 1141
             ->orderBy('days', 'desc')
Please login to merge, or discard this patch.
resources/lang/en-US/messages.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return array (
4
-  ' but the details are unknown' => ' but the details are unknown',
5
-  '%H:%i:%s' => '%g:%i:%s %a',
6
-  '%j %F %Y' => '%F %j, %Y',
7
-  'Asunción, Paraguay' => 'Asuncion, Paraguay',
8
-  'Bogotá, Colombia' => 'Bogota, Colombia',
9
-  'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico',
10
-  'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico',
11
-  'Curaçao' => 'Curacao',
12
-  'Córdoba, Argentina' => 'Cordoba, Argentina',
13
-  'Côte d’Ivoire' => 'Cote d’Ivoire',
14
-  'Réunion' => 'Reunion',
15
-  'Saint Barthélemy' => 'Saint Barthelemy',
16
-  'San José, Costa Rica' => 'San Jose, Costa Rica',
17
-  'São Paulo, Brazil' => 'Sao Paulo, Brazil',
18
-  'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico',
19
-  'Åland Islands' => 'Aland Islands',
4
+    ' but the details are unknown' => ' but the details are unknown',
5
+    '%H:%i:%s' => '%g:%i:%s %a',
6
+    '%j %F %Y' => '%F %j, %Y',
7
+    'Asunción, Paraguay' => 'Asuncion, Paraguay',
8
+    'Bogotá, Colombia' => 'Bogota, Colombia',
9
+    'Ciudad Juárez, Mexico' => 'Ciudad Juarez, Mexico',
10
+    'Colonia Juárez, Mexico' => 'Colonia Juarez, Mexico',
11
+    'Curaçao' => 'Curacao',
12
+    'Córdoba, Argentina' => 'Cordoba, Argentina',
13
+    'Côte d’Ivoire' => 'Cote d’Ivoire',
14
+    'Réunion' => 'Reunion',
15
+    'Saint Barthélemy' => 'Saint Barthelemy',
16
+    'San José, Costa Rica' => 'San Jose, Costa Rica',
17
+    'São Paulo, Brazil' => 'Sao Paulo, Brazil',
18
+    'Tuxtla Gutiérrez, Mexico' => 'Tuxtla Gutierrez, Mexico',
19
+    'Åland Islands' => 'Aland Islands',
20 20
 );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return array (
3
+return array(
4 4
   ' but the details are unknown' => ' but the details are unknown',
5 5
   '%H:%i:%s' => '%g:%i:%s %a',
6 6
   '%j %F %Y' => '%F %j, %Y',
Please login to merge, or discard this patch.
app/Cli/Commands/ConfigIni.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@
 block discarded – undo
81 81
             'dbcert'       => $this->stringOption(input: $input, name: 'dbcert'),
82 82
             'dbca'         => $this->stringOption(input: $input, name: 'dbca'),
83 83
             'dbverify'     => $this->boolOption(input: $input, name: 'dbverify') ? '1' : '0',
84
-            'tblpfx'       => $this->stringOption(input: $input, name: 'tblpfx'),
85
-            'base_url'     => rtrim(string: $this->stringOption(input: $input, name: 'base-url'), characters: '/'),
86
-            'rewrite_urls' => $this->boolOption(input: $input, name: 'rewrite-urls') ? '1' : '0',
87
-            'block_asn'    => $this->stringOption(input: $input, name: 'block-asn'),
84
+            'tblpfx'       => $this->stringOption(input : $input, name : 'tblpfx'),
85
+            'base_url'     => rtrim(string : $this->stringOption(input : $input, name : 'base-url'), characters : '/'),
86
+            'rewrite_urls' => $this->boolOption(input : $input, name : 'rewrite-urls') ? '1' : '0',
87
+            'block_asn'    => $this->stringOption(input : $input, name : 'block-asn'),
88 88
         ];
89 89
 
90 90
         foreach ($config as $key => $value) {
Please login to merge, or discard this patch.