| @@ 295-300 (lines=6) @@ | ||
| 292 | $pathValue = null; |
|
| 293 | if ($this->hasValue($data, $path)) { |
|
| 294 | $value = $this->getValue($data, $path); |
|
| 295 | if (false === is_array($value)) { |
|
| 296 | throw new \InvalidArgumentException( |
|
| 297 | sprintf("Value expected to be an array, but %s given", gettype($value)), |
|
| 298 | 400 |
|
| 299 | ); |
|
| 300 | } |
|
| 301 | ||
| 302 | $pathValue = []; |
|
| 303 | $keys = array_keys($value); |
|
| @@ 489-494 (lines=6) @@ | ||
| 486 | $pathValue = $value; |
|
| 487 | } elseif (is_numeric($value)) { |
|
| 488 | $pathValue = ('int' === $type) ? (int) $value : (float) $value; |
|
| 489 | } elseif (null !== $value) { |
|
| 490 | throw new \InvalidArgumentException( |
|
| 491 | sprintf("Value expected to be %s, but %s given", $type, gettype($value)), |
|
| 492 | 400 |
|
| 493 | ); |
|
| 494 | } |
|
| 495 | } |
|
| 496 | ||
| 497 | $this->restorePath(); |
|