Code Duplication    Length = 10-10 lines in 2 locations

src/Common/Collection/AbstractCollection.php 2 locations

@@ 161-170 (lines=10) @@
158
    /**
159
     * {@inheritDoc}
160
     */
161
    final public function exists(Closure $p)
162
    {
163
        foreach ($this->elements as $key => $element) {
164
            if ($p($key, $element)) {
165
                return true;
166
            }
167
        }
168
169
        return false;
170
    }
171
172
    /**
173
     * {@inheritDoc}
@@ 270-279 (lines=10) @@
267
    /**
268
     * {@inheritDoc}
269
     */
270
    final public function forAll(Closure $p)
271
    {
272
        foreach ($this->elements as $key => $element) {
273
            if ( ! $p($key, $element)) {
274
                return false;
275
            }
276
        }
277
278
        return true;
279
    }
280
281
    /**
282
     * {@inheritDoc}