@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | if (!is_numeric($index)) { |
| 124 | 124 | $target = $index; |
| 125 | 125 | $index = null; |
| 126 | - foreach ((array)$nodes as $nodeIndex => $node) { |
|
| 126 | + foreach ((array) $nodes as $nodeIndex => $node) { |
|
| 127 | 127 | if ($node['type'] === $target) { |
| 128 | 128 | $index = $nodeIndex; |
| 129 | 129 | break; |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | $index = null; |
| 208 | 208 | if (isset($this->data[$entityType][$path])) { |
| 209 | - foreach ((array)$this->data[$entityType][$path] as $nodeIndex => $node) { |
|
| 209 | + foreach ((array) $this->data[$entityType][$path] as $nodeIndex => $node) { |
|
| 210 | 210 | if ($node['type'] === $target) { |
| 211 | 211 | $index = $nodeIndex; |
| 212 | 212 | break; |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | if (is_numeric($index)) { |
| 295 | - $index = (int)$index; |
|
| 295 | + $index = (int) $index; |
|
| 296 | 296 | if ($removeAll) { |
| 297 | 297 | // Remove all (higher) values to prevent a new value after re-indexing |
| 298 | 298 | if ($index === 0) { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | // Filter out all nodes of the specified type |
| 308 | 308 | $this->data[$entityType][$path] = array_filter( |
| 309 | 309 | $this->data[$entityType][$path], |
| 310 | - static function ($node) use ($index) { |
|
| 310 | + static function($node) use ($index) { |
|
| 311 | 311 | return empty($node['type']) || $node['type'] !== $index; |
| 312 | 312 | } |
| 313 | 313 | ); |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | private function guardAgainstInvalidPath($path) |
| 363 | 363 | { |
| 364 | 364 | if (!is_string($path)) { |
| 365 | - throw new InvalidDataBagPathException('Invalid path provided: path must be a string ' . gettype($path).' given'); |
|
| 365 | + throw new InvalidDataBagPathException('Invalid path provided: path must be a string '.gettype($path).' given'); |
|
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | if ($path === '' // empty |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | || substr($path, -1) === '.' // ends with . |
| 371 | 371 | || in_array(strpos($path, '.'), [false, 0], true) // starts with or doesnt have any . |
| 372 | 372 | ) { |
| 373 | - throw new InvalidDataBagPathException('Invalid path provided: ' . $path); |
|
| 373 | + throw new InvalidDataBagPathException('Invalid path provided: '.$path); |
|
| 374 | 374 | } |
| 375 | 375 | } |
| 376 | 376 | |