Code Duplication    Length = 13-15 lines in 2 locations

src/Collection/AbstractCollection.php 1 location

@@ 57-71 (lines=15) @@
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function containsAll($elements) {
58
        $elements = $this->collectionToArray($elements);
59
60
        $result = TRUE;
61
62
        foreach($elements as $item) {
63
            if($this->contains($item) === FALSE) {
64
                $result = FALSE;
65
66
                break;
67
            }
68
        }
69
70
        return $result;
71
    }
72
73
    /**
74
     * {@inheritdoc}

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}