Code Duplication    Length = 9-9 lines in 2 locations

src/ObjectNode.php 2 locations

@@ 34-42 (lines=9) @@
31
     * @return void
32
     * @throw \InvalidArgumentException
33
     */
34
    public function removeAttribute(AttributeNode $attribute)
35
    {
36
        $name = $attribute->getName();
37
        if (!isset($this->attributes[$name])) {
38
            throw new \InvalidArgumentException("Unknown node!");
39
        }
40
41
        Document::setProperty($attribute, 'parent', null);
42
    }
43
44
    /**
45
     * @param  AttributeNode $node
@@ 110-118 (lines=9) @@
107
     * @param  AbstractElement $node
108
     * @return void
109
     */
110
    public function removeNode(AbstractElement $node)
111
    {
112
        $name = $node->getName();
113
        if (!isset($this->nodes[$name])) {
114
            throw new \InvalidArgumentException("Unknown node!");
115
        }
116
117
        Document::setProperty($node, 'parent', null);
118
    }
119
}
120