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