Code Duplication    Length = 14-14 lines in 2 locations

src/Traits/Sequence.php 1 location

@@ 71-84 (lines=14) @@
68
    /**
69
     * @inheritDoc
70
     */
71
    public function contains(...$values): bool
72
    {
73
        if ( ! $values) {
74
            return false;
75
        }
76
77
        foreach ($values as $value) {
78
            if ($this->find($value) === false) {
79
                return false;
80
            }
81
        }
82
83
        return true;
84
    }
85
86
    /**
87
     * @inheritDoc

src/Map.php 1 location

@@ 205-218 (lines=14) @@
202
    /**
203
     *
204
     */
205
    private function contains(string $lookup, array $values): bool
206
    {
207
        if (empty($values)) {
208
            return false;
209
        }
210
211
        foreach ($values as $value) {
212
            if ( ! $this->$lookup($value)) {
213
                return false;
214
            }
215
        }
216
217
        return true;
218
    }
219
220
    /**
221
     * Returns whether an association for all of zero or more keys exist.