Code Duplication    Length = 5-5 lines in 2 locations

src/NodeGenerator.php 2 locations

@@ 205-209 (lines=5) @@
202
                $nodeExpr = $this->createScalarNode($value);
203
            }
204
205
            if ($value instanceof \stdClass) {
206
                $nodeExpr = $this->appendChildrenToObjectNode($value);
207
            } elseif (is_array($value)) {
208
                $nodeExpr = $this->appendChildrenToArrayNode($value);
209
            }
210
211
            $expr = new MethodCall($expr, 'add', [new Arg($nodeExpr)]);
212
        }
@@ 234-238 (lines=5) @@
231
                $nodeExpr = $this->createScalarNode($value);
232
            }
233
234
            if ($value instanceof \stdClass) {
235
                $nodeExpr = $this->appendChildrenToObjectNode($value);
236
            } elseif (is_array($value)) {
237
                $nodeExpr = $this->appendChildrenToArrayNode($value);
238
            }
239
240
            $expr = new MethodCall($expr, 'add', [new Arg(new String_($key)), new Arg($nodeExpr)]);
241
        }