Passed
Push — 2.1 ( 7d875d...ecddab )
by Greg
08:25
created
app/Statistics/Repository/EventRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
             ->orderBy('d_type')
233 233
             ->limit(1)
234 234
             ->get()
235
-            ->map(static fn (object $row): object => (object) [
235
+            ->map(static fn (object $row) : object => (object) [
236 236
                 'id'   => $row->id,
237 237
                 'year' => (int) $row->year,
238 238
                 'fact' => $row->fact,
Please login to merge, or discard this patch.
app/Validator.php 1 patch
Spacing   +8 added lines, -8 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
             }
@@ -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);
@@ -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
     }
@@ -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
 
@@ -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
 
@@ -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.
resources/lang/en-US/messages.php 1 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
   '%H:%i:%s' => '%g:%i:%s %a',
5 5
   '%j %F %Y' => '%F %j, %Y',
6 6
   'Asunción, Paraguay' => 'Asuncion, Paraguay',
Please login to merge, or discard this patch.
app/SessionDatabaseHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 
115 115
             // Only update session once a minute to reduce contention on the session table.
116 116
             if ($now->subtractMinutes(1)->timestamp() > Registry::timestampFactory()->fromString($this->row->session_time)->timestamp()) {
117
-                $updates['session_time'] =  $now->toDateTimeString();
117
+                $updates['session_time'] = $now->toDateTimeString();
118 118
             }
119 119
 
120 120
             if ($updates !== []) {
Please login to merge, or discard this patch.
app/Factories/TimestampFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function make(int $timestamp, ?UserInterface $user = null): TimestampInterface
47 47
     {
48
-        $user     ??= Auth::user();
48
+        $user ??= Auth::user();
49 49
         $timezone = $user->getPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE'));
50 50
         $locale   = I18N::locale()->code();
51 51
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function fromString(?string $string, string $format = 'Y-m-d H:i:s', ?UserInterface $user = null): TimestampInterface
63 63
     {
64
-        $string    ??= date($format);
64
+        $string ??= date($format);
65 65
         $timestamp = date_create_from_format($format, $string);
66 66
 
67 67
         if ($timestamp === false) {
Please login to merge, or discard this patch.
app/Statistics/Repository/MediaRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@
 block discarded – undo
250 250
             ->where('m_file', '=', $this->tree->id())
251 251
             ->groupBy('source_media_type')
252 252
             ->pluck(new Expression('COUNT(*) AS total'), 'source_media_type')
253
-            ->map(static fn (string $n): int => (int) $n)
253
+            ->map(static fn (string $n) : int => (int) $n)
254 254
             ->all();
255 255
 
256 256
         return (new ChartMedia($this->color_service))
Please login to merge, or discard this patch.