@@ -21,7 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | protected function isIntValue($value) |
| 23 | 23 | { |
| 24 | - if (is_bool($value)) return false; |
|
| 24 | + if (is_bool($value)) { |
|
| 25 | + return false; |
|
| 26 | + } |
|
| 25 | 27 | return is_int($value) || preg_match('/^\d+$/', $value); |
| 26 | 28 | } |
| 27 | 29 | } |
| 28 | 30 | \ No newline at end of file |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | $name = $key; |
| 24 | 24 | $alias = $key; |
| 25 | 25 | } |
| 26 | - if (!isset($this->data[$name])) return new NullValueObject($name, null); |
|
| 26 | + if (!isset($this->data[$name])) { |
|
| 27 | + return new NullValueObject($name, null); |
|
| 28 | + } |
|
| 27 | 29 | |
| 28 | 30 | $value = new ValueObject($name, $this->data[$name]); |
| 29 | 31 | $value->setAlias($alias); |
@@ -26,7 +26,9 @@ |
||
| 26 | 26 | $this->name = $name; |
| 27 | 27 | $this->alias = $name; |
| 28 | 28 | $this->value = $value; |
| 29 | - if (!in_array($type, $this->types())) throw new ValueObjectInvalidTypeException('Wrong type: ' . $type); |
|
| 29 | + if (!in_array($type, $this->types())) { |
|
| 30 | + throw new ValueObjectInvalidTypeException('Wrong type: ' . $type); |
|
| 31 | + } |
|
| 30 | 32 | $this->type = $type; |
| 31 | 33 | } |
| 32 | 34 | |