src/Denormalizer/ReferenceFieldDenormalizer.php 1 location
|
@@ 61-67 (lines=7) @@
|
| 58 |
|
throw DeserializerLogicException::createMissingDenormalizer($path); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
if (is_array($value)) { |
| 62 |
|
$existingValue = $this->accessor->getValue($object) ?? $this->class; |
| 63 |
|
|
| 64 |
|
$this->accessor->setValue($object, $denormalizer->denormalize($existingValue, $value, $context)); |
| 65 |
|
|
| 66 |
|
return; |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
if (is_string($value)) { |
| 70 |
|
if (null === $repository = $this->repository) { |
src/Denormalizer/Relation/EmbedOneFieldDenormalizer.php 1 location
|
@@ 57-63 (lines=7) @@
|
| 54 |
|
throw DeserializerLogicException::createMissingDenormalizer($path); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
if (is_array($value)) { |
| 58 |
|
$existingValue = $this->accessor->getValue($object) ?? $this->class; |
| 59 |
|
|
| 60 |
|
$this->accessor->setValue($object, $denormalizer->denormalize($existingValue, $value, $context)); |
| 61 |
|
|
| 62 |
|
return; |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
throw DeserializerRuntimeException::createInvalidDataType($path, gettype($value), 'array'); |
| 66 |
|
} |