Code Duplication    Length = 11-11 lines in 2 locations

src/Tokens/TokenContainer.php 1 location

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

src/Tokens/Element.php 1 location

@@ 143-153 (lines=11) @@
140
    /**
141
     * Required by the ContainsChildren interface.
142
     */
143
    public function removeChild(Token $token)
144
    {
145
        $key = array_search($token, $this->children, true);
146
        if ($key !== false) {
147
            unset($this->children[$key]);
148
149
            return true;
150
        }
151
152
        return false;
153
    }
154
155
    /**
156
     * Getter for 'name'.