Code Duplication    Length = 8-9 lines in 2 locations

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

@@ 502-510 (lines=9) @@
499
            case self::TYPE_REMOVE:
500
                return $this->collection->deleteMany($this->query['query'], $options);
501
502
            case self::TYPE_DISTINCT:
503
                $collection = $this->collection;
504
                $query = $this->query;
505
506
                return $collection->distinct(
507
                    $query['distinct'],
508
                    $query['query'],
509
                    array_merge($options, $this->getQueryOptions('readPreference'))
510
                );
511
512
            case self::TYPE_COUNT:
513
                $collection = $this->collection;
@@ 512-519 (lines=8) @@
509
                    array_merge($options, $this->getQueryOptions('readPreference'))
510
                );
511
512
            case self::TYPE_COUNT:
513
                $collection = $this->collection;
514
                $query = $this->query;
515
516
                return $collection->count(
517
                    $query['query'],
518
                    array_merge($options, $this->getQueryOptions('hint', 'limit', 'skip', 'readPreference'))
519
                );
520
        }
521
    }
522
}