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