Code Duplication    Length = 12-12 lines in 2 locations

src/Node/ArrayNode.php 1 location

@@ 22-33 (lines=12) @@
19
        return $node;
20
    }
21
22
    public function __clone()
23
    {
24
        parent::__clone();
25
26
        $children = $this->children;
27
28
        $this->children = [];
29
30
        foreach ($children as $node) {
31
            $this->add(clone $node);
32
        }
33
    }
34
35
    /**
36
     * @param AbstractNode $node

src/Node/ObjectNode.php 1 location

@@ 22-33 (lines=12) @@
19
        return $node;
20
    }
21
22
    public function __clone()
23
    {
24
        parent::__clone();
25
26
        $children = $this->children;
27
28
        $this->children = [];
29
30
        foreach ($children as $key => $node) {
31
            $this->add($key, clone $node);
32
        }
33
    }
34
35
    /**
36
     * @param string       $key