|
@@ 184-189 (lines=6) @@
|
| 181 |
|
$proptype = $proptype; |
| 182 |
|
$array = self::createInstance($proptype, false, $jsonValue); |
| 183 |
|
} |
| 184 |
|
} elseif (\is_a($type, \ArrayObject::class, true)) { |
| 185 |
|
/** @noinspection PhpSillyAssignmentInspection - phpstan helper */ |
| 186 |
|
/** @phpstan-var \ArrayObject<mixed, mixed> $type */ |
| 187 |
|
$type = $type; |
| 188 |
|
$array = self::createInstance($type, false, $jsonValue); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
if ($array !== null) { |
| 192 |
|
/** @noinspection NotOptimalIfConditionsInspection */ |
|
@@ 297-305 (lines=9) @@
|
| 294 |
|
throw new \InvalidArgumentException( |
| 295 |
|
'JSON property "' . ($parent_key ?: '?') . '" is an array of type "' . $class . '" but contained a value of type "' . \gettype($jsonValue) . '"' |
| 296 |
|
); |
| 297 |
|
} elseif (\is_a($class, \ArrayObject::class, true)) { |
| 298 |
|
/** @noinspection PhpSillyAssignmentInspection - phpstan helper */ |
| 299 |
|
/** @phpstan-var \ArrayObject<mixed, mixed> $class */ |
| 300 |
|
$class = $class; |
| 301 |
|
$array[$key] = $this->mapArray( |
| 302 |
|
$jsonValue, |
| 303 |
|
self::createInstance($class) |
| 304 |
|
); |
| 305 |
|
} else { |
| 306 |
|
/** @noinspection PhpSillyAssignmentInspection - phpstan helper */ |
| 307 |
|
/** @phpstan-var class-string $class */ |
| 308 |
|
$class = $class; |