@@ -15,7 +15,9 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | public function get($key){ |
| 18 | - if(!isset($this->data[$key])) return new NullValueObject($key, null); |
|
| 18 | + if(!isset($this->data[$key])) { |
|
| 19 | + return new NullValueObject($key, null); |
|
| 20 | + } |
|
| 19 | 21 | |
| 20 | 22 | return new ValueObject($key, $this->data[$key]); |
| 21 | 23 | } |
@@ -24,7 +24,9 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $this->name = $name; |
| 26 | 26 | $this->value = $value; |
| 27 | - if(!in_array($type, $this->types())) throw new ValueObjectInvalidTypeException('Wrong type: '. $type); |
|
| 27 | + if(!in_array($type, $this->types())) { |
|
| 28 | + throw new ValueObjectInvalidTypeException('Wrong type: '. $type); |
|
| 29 | + } |
|
| 28 | 30 | $this->type = $type; |
| 29 | 31 | } |
| 30 | 32 | |