Code Duplication    Length = 7-7 lines in 2 locations

src/Set/Set.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

@@ 210-216 (lines=7) @@
207
    public function retainAll($elements) {
208
        $elements = $this->collectionToArray($elements);
209
210
        foreach($this->data as $index => $item) {
211
            if(array_search($item, $elements, TRUE) !== FALSE) {
212
                continue;
213
            }
214
215
            unset($this->data[$index]);
216
        }
217
    }
218
219
}