Code Duplication    Length = 5-5 lines in 2 locations

src/NodeGenerator.php 2 locations

@@ 155-159 (lines=5) @@
152
                $nodeExpr = $this->createScalarNode($value);
153
            }
154
155
            if ($value instanceof \stdClass) {
156
                $nodeExpr = $this->appendChildrenToObjectNode($value);
157
            } elseif (is_array($value)) {
158
                $nodeExpr = $this->appendChildrenToArrayNode($value);
159
            }
160
161
            $expr = new MethodCall($expr, 'add', [new Arg($nodeExpr)]);
162
        }
@@ 184-188 (lines=5) @@
181
                $nodeExpr = $this->createScalarNode($value);
182
            }
183
184
            if ($value instanceof \stdClass) {
185
                $nodeExpr = $this->appendChildrenToObjectNode($value);
186
            } elseif (is_array($value)) {
187
                $nodeExpr = $this->appendChildrenToArrayNode($value);
188
            }
189
190
            $expr = new MethodCall($expr, 'add', [new Arg(new String_($key)), new Arg($nodeExpr)]);
191
        }