Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 701-703 (lines=3) @@
698
        $arrayAccess ? $this->coll->offsetSet(null, $value) : $this->coll->add($value);
699
        $this->changed();
700
701
        if ($this->uow !== null && $this->isOrphanRemovalEnabled() && $value !== null) {
702
            $this->uow->unscheduleOrphanRemoval($value);
703
        }
704
705
        return true;
706
    }
@@ 742-744 (lines=3) @@
739
        $arrayAccess ? $this->coll->offsetSet($offset, $value) : $this->coll->set($offset, $value);
740
741
        // Handle orphanRemoval
742
        if ($this->uow !== null && $this->isOrphanRemovalEnabled() && $value !== null) {
743
            $this->uow->unscheduleOrphanRemoval($value);
744
        }
745
746
        $this->changed();
747
    }