@@ -9,7 +9,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |