@@ -14,8 +14,9 @@ discard block |
||
14 | 14 | private $values = []; |
15 | 15 | |
16 | 16 | public function __construct(array $arrayConfig = []) { |
17 | - foreach($arrayConfig as $key => $value) |
|
18 | - $this->offsetSet($key, $value); |
|
17 | + foreach($arrayConfig as $key => $value) { |
|
18 | + $this->offsetSet($key, $value); |
|
19 | + } |
|
19 | 20 | |
20 | 21 | $this->onConstruct(); |
21 | 22 | } |
@@ -64,8 +65,9 @@ discard block |
||
64 | 65 | } |
65 | 66 | |
66 | 67 | public function offsetGet($offset) { |
67 | - if (!$this->offsetExists($offset)) |
|
68 | - throw new \OutOfBoundsException("offset '{$offset}' does not exist"); |
|
68 | + if (!$this->offsetExists($offset)) { |
|
69 | + throw new \OutOfBoundsException("offset '{$offset}' does not exist"); |
|
70 | + } |
|
69 | 71 | return $this->values[$offset]; |
70 | 72 | } |
71 | 73 | |
@@ -117,7 +119,8 @@ discard block |
||
117 | 119 | } |
118 | 120 | |
119 | 121 | private function blockIfLocked() { |
120 | - if ($this->isLocked()) |
|
121 | - throw new CanNotMutateException(); |
|
122 | + if ($this->isLocked()) { |
|
123 | + throw new CanNotMutateException(); |
|
124 | + } |
|
122 | 125 | } |
123 | 126 | } |
124 | 127 | \ No newline at end of file |