Passed
Push — main ( 821275...ebe785 )
by Greg
08:29
created
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
             }
@@ -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);
@@ -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
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             $value = null;
307 307
         }
308 308
 
309
-        $callback = static fn (?int $value, Closure $rule): ?int => $rule($value);
309
+        $callback = static fn (?int $value, Closure $rule) : ?int => $rule($value);
310 310
 
311 311
         $value = array_reduce($this->rules, $callback, $value) ?? $default;
312 312
 
@@ -347,9 +347,9 @@  discard block
 block discarded – undo
347 347
             $value = null;
348 348
         }
349 349
 
350
-        $callback = static fn (?string $value, Closure $rule): ?string => $rule($value);
350
+        $callback = static fn (?string $value, Closure $rule) : ?string => $rule($value);
351 351
 
352
-        $value =  array_reduce($this->rules, $callback, $value) ?? $default;
352
+        $value = array_reduce($this->rules, $callback, $value) ?? $default;
353 353
 
354 354
         if ($value === null) {
355 355
             throw new HttpBadRequestException(I18N::translate('The parameter “%s” is missing.', $parameter));
Please login to merge, or discard this patch.