Code Duplication    Length = 11-11 lines in 2 locations

src/Tokens/Elements/Element.php 1 location

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

src/Tokens/TokenContainer.php 1 location

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