@@ -15,6 +15,9 @@ |
||
| 15 | 15 | $this->throwImmutable(sprintf($msg, static::class)); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @param string $msg |
|
| 20 | + */ |
|
| 18 | 21 | protected function throwImmutable($msg, $errorCode = null) |
| 19 | 22 | { |
| 20 | 23 | throw new ImmutableCollectionException($msg, $errorCode); |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | final public function offsetUnset($offset) { |
| 14 | - $msg = 'Collection %s is immutable and values cannot be unset.'; |
|
| 15 | - $this->throwImmutable(sprintf($msg, static::class)); |
|
| 14 | + $msg = 'Collection %s is immutable and values cannot be unset.'; |
|
| 15 | + $this->throwImmutable(sprintf($msg, static::class)); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | protected function throwImmutable($msg, $errorCode = null) |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | |
| 24 | 24 | $arrayStorage = ImmutableArrayStorage::fromTraversable($objects); |
| 25 | 25 | |
| 26 | -foreach($arrayStorage as $object) { |
|
| 26 | +foreach ($arrayStorage as $object) { |
|
| 27 | 27 | echo $object->say(); |
| 28 | 28 | } |