@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | // Invalid path |
| 102 | 102 | if (strpos($path, '.') === false) { |
| 103 | - throw new InvalidDataBagPathException('Invalid get path: ' . $path); |
|
| 103 | + throw new InvalidDataBagPathException('Invalid get path: '.$path); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | list($entityType, $path) = explode('.', $path, 2); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | if (!is_numeric($index)) { |
| 129 | 129 | $target = $index; |
| 130 | 130 | $index = null; |
| 131 | - foreach ((array)$nodes as $nodeIndex => $node) { |
|
| 131 | + foreach ((array) $nodes as $nodeIndex => $node) { |
|
| 132 | 132 | if ($node['type'] === $target) { |
| 133 | 133 | $index = $nodeIndex; |
| 134 | 134 | break; |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | // Invalid path, can't store |
| 184 | 184 | if (substr_count($path, '.') === 0) { |
| 185 | - throw new InvalidDataBagPathException('Invalid set path: ' . $path); |
|
| 185 | + throw new InvalidDataBagPathException('Invalid set path: '.$path); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | if ($value === null) { |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | } |
| 214 | 214 | $index = null; |
| 215 | 215 | if (isset($this->data[$entityType][$path])) { |
| 216 | - foreach ((array)$this->data[$entityType][$path] as $nodeIndex => $node) { |
|
| 216 | + foreach ((array) $this->data[$entityType][$path] as $nodeIndex => $node) { |
|
| 217 | 217 | if ($node['type'] === $target) { |
| 218 | 218 | $index = $nodeIndex; |
| 219 | 219 | break; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | { |
| 271 | 271 | // Invalid path, can't remove |
| 272 | 272 | if (substr_count($path, '.') === 0) { |
| 273 | - throw new InvalidDataBagPathException('Invalid remove path: ' . $path); |
|
| 273 | + throw new InvalidDataBagPathException('Invalid remove path: '.$path); |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | list($entityType, $path) = explode('.', $path, 2); |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | if (is_numeric($index)) { |
| 305 | - $index = (int)$index; |
|
| 305 | + $index = (int) $index; |
|
| 306 | 306 | if ($removeAll) { |
| 307 | 307 | // Remove all (higher) values to prevent a new value after re-indexing |
| 308 | 308 | if ($index === 0) { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | // Filter out all nodes of the specified type |
| 318 | 318 | $this->data[$entityType][$path] = array_filter( |
| 319 | 319 | $this->data[$entityType][$path], |
| 320 | - static function ($node) use ($index) { |
|
| 320 | + static function($node) use ($index) { |
|
| 321 | 321 | return empty($node['type']) || $node['type'] !== $index; |
| 322 | 322 | } |
| 323 | 323 | ); |