Skip to content

Commit aa82c50

Browse files
authored
Merge pull request #1659 from deguif/fix-weird-cs
Fix weird CS
2 parents ec65289 + 165b82f commit aa82c50

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Transformer/ModelToElasticaAutoTransformer.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,15 @@ protected function transformObjectToDocument(object $object, array $fields, stri
141141
}
142142

143143
foreach ($fields as $key => $mapping) {
144-
$path = $mapping['property_path'] ??
145-
$key;
144+
$path = $mapping['property_path'] ?? $key;
146145
if (false === $path) {
147146
continue;
148147
}
149148
$value = $this->propertyAccessor->getValue($object, $path);
150149

151-
if (isset($mapping['type']) && in_array(
152-
$mapping['type'], ['nested', 'object'], true
153-
) && isset($mapping['properties']) && !empty($mapping['properties'])
150+
if (isset($mapping['type'])
151+
&& in_array($mapping['type'], ['nested', 'object'], true)
152+
&& isset($mapping['properties']) && !empty($mapping['properties'])
154153
) {
155154
/* $value is a nested document or object. Transform $value into
156155
* an array of documents, respective the mapped properties.

0 commit comments

Comments
 (0)