Code Duplication    Length = 13-15 lines in 2 locations

src/Set.php 1 location

@@ 78-90 (lines=13) @@
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function removeAll($elements) {
79
        $elements = $this->collectionToArray($elements);
80
81
        $result = FALSE;
82
83
        foreach($elements as $item) {
84
            if($this->remove($item) === TRUE) {
85
                $result = TRUE;
86
            }
87
        }
88
89
        return $result;
90
    }
91
92
    /**
93
     * {@inheritdoc}

src/Collection/AbstractCollection.php 1 location

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