@@ 157-163 (lines=7) @@ | ||
154 | $expr = $this->createArrayNode(); |
|
155 | ||
156 | foreach ($data as $key => $value) { |
|
157 | if ($value instanceof \stdClass) { |
|
158 | $nodeExpr = $this->createObjectNode(); |
|
159 | } elseif (is_array($value)) { |
|
160 | $nodeExpr = $this->createArrayNode(); |
|
161 | } else { |
|
162 | $nodeExpr = $this->createScalarNode($value); |
|
163 | } |
|
164 | ||
165 | if ($value instanceof \stdClass) { |
|
166 | $nodeExpr = $this->appendChildrenToObjectNode($value); |
|
@@ 187-193 (lines=7) @@ | ||
184 | $expr = $this->createObjectNode(); |
|
185 | ||
186 | foreach ($data as $key => $value) { |
|
187 | if ($value instanceof \stdClass) { |
|
188 | $nodeExpr = $this->createObjectNode(); |
|
189 | } elseif (is_array($value)) { |
|
190 | $nodeExpr = $this->createArrayNode(); |
|
191 | } else { |
|
192 | $nodeExpr = $this->createScalarNode($value); |
|
193 | } |
|
194 | ||
195 | if ($value instanceof \stdClass) { |
|
196 | $nodeExpr = $this->appendChildrenToObjectNode($value); |
@@ 128-134 (lines=7) @@ | ||
125 | private function appendChildrenToArrayNode(Expr $queryBuilder, Expr $expr, array $data) |
|
126 | { |
|
127 | foreach ($data as $value) { |
|
128 | if ($value instanceof \stdClass) { |
|
129 | $argument = $this->createObjectNode($queryBuilder); |
|
130 | } elseif (is_array($value)) { |
|
131 | $argument = $this->createArrayNode($queryBuilder); |
|
132 | } else { |
|
133 | $argument = $this->createScalarNode($queryBuilder, $value); |
|
134 | } |
|
135 | ||
136 | $methodName = $this->useMethodName ? 'addToArrayNode' : 'add'; |
|
137 | ||
@@ 160-166 (lines=7) @@ | ||
157 | private function appendChildrenToObjectNode(Expr $queryBuilder, Expr $expr, \stdClass $data) |
|
158 | { |
|
159 | foreach ($data as $key => $value) { |
|
160 | if ($value instanceof \stdClass) { |
|
161 | $argument = $this->createObjectNode($queryBuilder); |
|
162 | } elseif (is_array($value)) { |
|
163 | $argument = $this->createArrayNode($queryBuilder); |
|
164 | } else { |
|
165 | $argument = $this->createScalarNode($queryBuilder, $value); |
|
166 | } |
|
167 | ||
168 | $methodName = $this->useMethodName ? 'addToObjectNode' : 'add'; |
|
169 |