| @@ 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); |
|
| @@ 526-531 (lines=6) @@ | ||
| 523 | $pathValue = $value; |
|
| 524 | } elseif (is_numeric($value)) { |
|
| 525 | $pathValue = ('int' === $type) ? (int) $value : (float) $value; |
|
| 526 | } elseif (null !== $value) { |
|
| 527 | throw new \InvalidArgumentException( |
|
| 528 | sprintf("Value expected to be %s, but %s given", $type, gettype($value)), |
|
| 529 | 400 |
|
| 530 | ); |
|
| 531 | } |
|
| 532 | } |
|
| 533 | ||
| 534 | $this->restorePath(); |
|