@@ 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); |
|
@@ 497-502 (lines=6) @@ | ||
494 | $pathValue = $value; |
|
495 | } elseif (is_numeric($value)) { |
|
496 | $pathValue = ('int' === $type) ? (int) $value : (float) $value; |
|
497 | } elseif (null !== $value) { |
|
498 | throw new \InvalidArgumentException( |
|
499 | sprintf("Value expected to be %s, but %s given", $type, gettype($value)), |
|
500 | 400 |
|
501 | ); |
|
502 | } |
|
503 | } |
|
504 | ||
505 | $this->restorePath(); |