Code Duplication    Length = 4-4 lines in 2 locations

src/AbstractDoctrineRepository.php 2 locations

@@ 53-56 (lines=4) @@
50
        $qb = $this->connection->createQueryBuilder();
51
        $qb->select('*')->from($this->getTablename())->setMaxResults(1);
52
53
        foreach ($criteria as $field => $value) {
54
            $qb->andWhere($qb->expr()->eq($field, ':'.$field));
55
            $qb->setParameter($field, $value);
56
        }
57
58
        $row = $qb->execute()->fetch(\PDO::FETCH_ASSOC);
59
        if (false === $row) {
@@ 79-82 (lines=4) @@
76
        $qb = $this->connection->createQueryBuilder();
77
        $qb->select('*')->from($this->getTablename());
78
79
        foreach ($criteria as $field => $value) {
80
            $qb->andWhere($qb->expr()->eq($field, ':'.$field));
81
            $qb->setParameter($field, $value);
82
        }
83
84
        $rows = $qb->execute()->fetchAll(\PDO::FETCH_ASSOC);
85