UserRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A findLatest() 0 7 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
/**
6
 * VideoRepository.
7
 *
8
 * This class was generated by the Doctrine ORM. Add your own custom
9
 * repository methods below.
10
 */
11
class UserRepository extends \Doctrine\ORM\EntityRepository
12
{
13
    public function findLatest($nth)
14
    {
15
        return $this->getEntityManager()
16
            ->createQuery(
17
                'SELECT v FROM AppBundle:USER v ORDER BY v.id DESC'
18
            )
19
            ->setMaxResults($nth)->getResult();
20
    }
21
}
22