Code Duplication    Length = 5-5 lines in 2 locations

src/NodeGenerator.php 2 locations

@@ 165-169 (lines=5) @@
162
                $nodeExpr = $this->createScalarNode($value);
163
            }
164
165
            if ($value instanceof \stdClass) {
166
                $nodeExpr = $this->appendChildrenToObjectNode($value);
167
            } elseif (is_array($value)) {
168
                $nodeExpr = $this->appendChildrenToArrayNode($value);
169
            }
170
171
            $expr = new MethodCall($expr, 'add', [new Arg($nodeExpr)]);
172
        }
@@ 195-199 (lines=5) @@
192
                $nodeExpr = $this->createScalarNode($value);
193
            }
194
195
            if ($value instanceof \stdClass) {
196
                $nodeExpr = $this->appendChildrenToObjectNode($value);
197
            } elseif (is_array($value)) {
198
                $nodeExpr = $this->appendChildrenToArrayNode($value);
199
            }
200
201
            $expr = new MethodCall($expr, 'add', [new Arg(new String_($key)), new Arg($nodeExpr)]);
202
        }