Code Duplication    Length = 5-5 lines in 2 locations

src/NodeGenerator.php 2 locations

@@ 161-165 (lines=5) @@
158
                $nodeExpr = $this->createScalarNode($value);
159
            }
160
161
            if ($value instanceof \stdClass) {
162
                $nodeExpr = $this->appendChildrenToObjectNode($value);
163
            } elseif (is_array($value)) {
164
                $nodeExpr = $this->appendChildrenToArrayNode($value);
165
            }
166
167
            $expr = new MethodCall($expr, 'add', [new Arg($nodeExpr)]);
168
        }
@@ 191-195 (lines=5) @@
188
                $nodeExpr = $this->createScalarNode($value);
189
            }
190
191
            if ($value instanceof \stdClass) {
192
                $nodeExpr = $this->appendChildrenToObjectNode($value);
193
            } elseif (is_array($value)) {
194
                $nodeExpr = $this->appendChildrenToArrayNode($value);
195
            }
196
197
            $expr = new MethodCall($expr, 'add', [new Arg(new String_($key)), new Arg($nodeExpr)]);
198
        }