Code Duplication    Length = 7-7 lines in 2 locations

src/Set/HashSet.php 1 location

@@ 151-157 (lines=7) @@
148
149
        $result = FALSE;
150
151
        foreach($this->data as $index => $data) {
152
            if(array_search($data, $elements) === FALSE) {
153
                unset($this->data[$index]);
154
155
                $result = TRUE;
156
            }
157
        }
158
159
        return $result;
160
    }

src/ArrayList/ArrayList.php 1 location

@@ 205-211 (lines=7) @@
202
    public function retainAll($elements) {
203
        $elements = $this->collectionToArray($elements);
204
205
        foreach($this->data as $index => $item) {
206
            if(array_search($item, $elements, TRUE) !== FALSE) {
207
                continue;
208
            }
209
210
            unset($this->data[$index]);
211
        }
212
    }
213
214
    /**