Completed
Push — master ( 54cab6...53f2a7 )
by Ori
03:07 queued 01:01
created
src/Fields/BaseField.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function __construct($descriptor = null)
11 11
     {
12
-        $this->descriptor = empty($descriptor) ? (object) [] : $descriptor;
12
+        $this->descriptor = empty($descriptor) ? (object)[] : $descriptor;
13 13
     }
14 14
 
15 15
     public function descriptor()
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         if (!$this->constraintsDisabled && isset($this->descriptor()->constraints)) {
42 42
             return $this->descriptor()->constraints;
43 43
         } else {
44
-            return (object) [];
44
+            return (object)[];
45 45
         }
46 46
     }
47 47
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
     protected function checkPatternConstraint($val, $pattern)
281 281
     {
282
-        return preg_match('/^'.$pattern.'$/', $val) === 1;
282
+        return preg_match('/^' . $pattern . '$/', $val) === 1;
283 283
     }
284 284
 
285 285
     protected function checkMinimumConstraint($val, $minConstraint)
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         } elseif (is_array($val)) {
300 300
             return count($val);
301 301
         } elseif (is_object($val)) {
302
-            return count((array) $val);
302
+            return count((array)$val);
303 303
         } else {
304 304
             throw $this->getValidationException('invalid value for length constraint', $val);
305 305
         }
Please login to merge, or discard this patch.