Code Duplication    Length = 11-11 lines in 2 locations

src/Tokens/Elements/Element.php 1 location

@@ 120-130 (lines=11) @@
117
    /**
118
     * Required by ContainsChildren interface.
119
     */
120
    public function removeChild(Token $token)
121
    {
122
        $key = array_search($token, $this->children);
123
        if ($key !== false) {
124
            unset($this->children[$key]);
125
126
            return true;
127
        }
128
129
        return false;
130
    }
131
132
    /**
133
     * Getter for 'name'.

src/Tokens/TokenContainer.php 1 location

@@ 54-64 (lines=11) @@
51
    /**
52
     * Required by ContainsChildren interface.
53
     */
54
    public function removeChild(Token $token)
55
    {
56
        $key = array_search($token, $this->children);
57
        if ($key !== false) {
58
            unset($this->children[$key]);
59
60
            return true;
61
        }
62
63
        return false;
64
    }
65
66
    /**
67
     * Required by Cleanable interface.