OrderRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findLatest() 0 10 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
class OrderRepository extends EntityRepository
8
{
9
    public function findLatest($count = 30)
10
    {
11
        return $this
12
            ->createQueryBuilder('o')
13
            ->orderBy('o.createdAt', 'DESC')
14
            ->setMaxResults($count)
15
            ->getQuery()
16
            ->getResult()
17
        ;
18
    }
19
}
20