Code Duplication    Length = 8-8 lines in 2 locations

lib/Doctrine/ODM/MongoDB/PersistentCollection.php 2 locations

@@ 319-326 (lines=8) @@
316
     *
317
     * @return array
318
     */
319
    public function getDeleteDiff()
320
    {
321
        return array_udiff_assoc(
322
            $this->snapshot,
323
            $this->coll->toArray(),
324
            function ($a, $b) { return $a === $b ? 0 : 1; }
325
        );
326
    }
327
328
    /**
329
     * INTERNAL: get objects that were removed, unlike getDeleteDiff this doesn't care about indices.
@@ 354-361 (lines=8) @@
351
     *
352
     * @return array
353
     */
354
    public function getInsertDiff()
355
    {
356
        return array_udiff_assoc(
357
            $this->coll->toArray(),
358
            $this->snapshot,
359
            function ($a, $b) { return $a === $b ? 0 : 1; }
360
        );
361
    }
362
363
    /**
364
     * INTERNAL: