Code Duplication    Length = 13-15 lines in 2 locations

src/Collection/AbstractCollection.php 1 location

@@ 49-63 (lines=15) @@
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function containsAll($elements) {
50
        $elements = $this->collectionToArray($elements);
51
52
        $result = TRUE;
53
54
        foreach($elements as $item) {
55
            if($this->contains($item) === FALSE) {
56
                $result = FALSE;
57
58
                break;
59
            }
60
        }
61
62
        return $result;
63
    }
64
65
    /**
66
     * {@inheritdoc}

src/Set/Set.php 1 location

@@ 88-100 (lines=13) @@
85
    /**
86
     * {@inheritdoc}
87
     */
88
    public function removeAll($elements) {
89
        $elements = $this->collectionToArray($elements);
90
91
        $result = FALSE;
92
93
        foreach($elements as $item) {
94
            if($this->remove($item) === TRUE) {
95
                $result = TRUE;
96
            }
97
        }
98
99
        return $result;
100
    }
101
102
    /**
103
     * {@inheritdoc}