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

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