| @@ 301-306 (lines=6) @@ | ||
| 298 | $pathValue = null; |
|
| 299 | if ($this->hasValue($data, $path)) { |
|
| 300 | $value = $this->getValue($data, $path); |
|
| 301 | if (false === is_array($value)) { |
|
| 302 | throw new \InvalidArgumentException( |
|
| 303 | sprintf("Value expected to be an array, but %s given", gettype($value)), |
|
| 304 | 400 |
|
| 305 | ); |
|
| 306 | } |
|
| 307 | ||
| 308 | $pathValue = []; |
|
| 309 | $keys = array_keys($value); |
|
| @@ 533-538 (lines=6) @@ | ||
| 530 | $pathValue = $value; |
|
| 531 | } elseif (is_numeric($value)) { |
|
| 532 | $pathValue = ('int' === $type) ? (int) $value : (float) $value; |
|
| 533 | } elseif (null !== $value) { |
|
| 534 | throw new \InvalidArgumentException( |
|
| 535 | sprintf("Value expected to be %s, but %s given", $type, gettype($value)), |
|
| 536 | 400 |
|
| 537 | ); |
|
| 538 | } |
|
| 539 | } |
|
| 540 | ||
| 541 | $this->restorePath(); |
|