Passed
Branch master (6e2713)
by Zangra
14:31
created

GeodisRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A findLast() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace GeodisBundle\Repository;
5
6
use Doctrine\ORM\EntityRepository;
7
8
class GeodisRepository extends EntityRepository
9
{
10
    public function findLast()
11
    {
12
        $qb = $this->createQueryBuilder('e');
13
        $qb->setMaxResults(1);
14
        $qb->orderBy('e.id', 'DESC');
15
16
        return $qb->getQuery()->getOneOrNullResult();
17
    }
18
}
19