Code Duplication    Length = 11-11 lines in 2 locations

src/Tokens/Elements/Element.php 1 location

@@ 132-142 (lines=11) @@
129
    /**
130
     * Required by the ContainsChildren interface.
131
     */
132
    public function removeChild(Token $token)
133
    {
134
        $key = array_search($token, $this->children);
135
        if ($key !== false) {
136
            unset($this->children[$key]);
137
138
            return true;
139
        }
140
141
        return false;
142
    }
143
144
    /**
145
     * Getter for 'name'.

src/Tokens/TokenContainer.php 1 location

@@ 66-76 (lines=11) @@
63
    /**
64
     * Required by ContainsChildren interface.
65
     */
66
    public function removeChild(Token $token)
67
    {
68
        $key = array_search($token, $this->children);
69
        if ($key !== false) {
70
            unset($this->children[$key]);
71
72
            return true;
73
        }
74
75
        return false;
76
    }
77
78
    /**
79
     * Required by Cleanable interface.