Code Duplication    Length = 11-11 lines in 2 locations

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, true);
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.

src/Tokens/Element.php 1 location

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