@@ -32,7 +32,9 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function setType($type) |
| 34 | 34 | { |
| 35 | - if (!in_array($type, $this->types())) throw new ValueObjectInvalidTypeException('Wrong type: ' . $type); |
|
| 35 | + if (!in_array($type, $this->types())) { |
|
| 36 | + throw new ValueObjectInvalidTypeException('Wrong type: ' . $type); |
|
| 37 | + } |
|
| 36 | 38 | $this->type = $type; |
| 37 | 39 | } |
| 38 | 40 | |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | protected function isFloatValue($value) |
| 25 | 25 | { |
| 26 | - if (is_bool($value)) return false; |
|
| 26 | + if (is_bool($value)) { |
|
| 27 | + return false; |
|
| 28 | + } |
|
| 27 | 29 | return is_float($value) || preg_match('/^[\d\.]+$/', $value); |
| 28 | 30 | } |
| 29 | 31 | |