Почистил от мусора
This commit is contained in:
parent
43bc10d24f
commit
988a4a01d1
@ -69,26 +69,18 @@ class Dto2DataConverter
|
||||
foreach ($map as $key => $propertyInfo) {
|
||||
try {
|
||||
$sourceName = is_array($propertyInfo) ? $key : $propertyInfo;
|
||||
|
||||
$value = $this->grabValue($object, $sourceName, $tags);
|
||||
|
||||
$canSkip = false;
|
||||
// Если нет карты, то не сериализуем.
|
||||
if (is_iterable($value)) {
|
||||
$childMap = is_array($propertyInfo) ? $propertyInfo : null;
|
||||
$value = $this->convertArrayByMap($value, $childMap, $tags);
|
||||
} elseif (is_object($value) && is_array($propertyInfo)) {
|
||||
$value = $this->convertObjectByMap($value, $propertyInfo, $tags);
|
||||
} elseif (!is_scalar($value) && null !== $value) {
|
||||
$canSkip = true;
|
||||
}
|
||||
|
||||
$this->processIterationTransformers($object, $sourceName, $value, $tags);
|
||||
|
||||
if ($canSkip && !is_scalar($value) && null !== $value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$dataPath = $this->grabIterationDataPath($object, $sourceName, $tags);
|
||||
$data[$dataPath] = $value;
|
||||
} catch (\Throwable $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user