Code Duplication    Length = 5-5 lines in 2 locations

src/Set.php 2 locations

@@ 77-81 (lines=5) @@
74
75
        // Loop through items in $this, if any do not exist in $set then the
76
        // two Sets are not equal.
77
        foreach($this->data as $item) {
78
            if (false === in_array($item, $set->data->toArray(), true)) {
79
                return false;
80
            }
81
        }
82
83
        // Loop through items in $set. If any do not exist in $this then they
84
        // they are not equal.
@@ 85-89 (lines=5) @@
82
83
        // Loop through items in $set. If any do not exist in $this then they
84
        // they are not equal.
85
        foreach ($set->data as $item) {
86
            if (false === in_array($item, $this->data->toArray(), true)) {
87
                return false;
88
            }
89
        }
90
91
        return $this->isSameTypeAs($set, $flags)
92
            && $this->isSameObjectAs($set, $flags);