Completed
Push — sf2.7 ( 8586ff...27ae11 )
by Laurent
03:38
created

InventoryRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInventory() 0 9 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
/**
8
 * InventoryRepository
9
 *
10
 * This class was generated by the Doctrine ORM. Add your own custom
11
 * repository methods below.
12
 */
13
class InventoryRepository extends EntityRepository
14
{
15
    /**
16
     * Affiche les inventaires actifs.
17
     *
18
     * @return QueryBuilder Requête DQL
19
     */
20
    public function getInventory()
21
    {
22
        $query = $this->createQueryBuilder('i')
23
            ->where('i.status > 0')
24
            ->orderBy('i.id', 'DESC')
25
            ->getQuery();
26
        
27
        return $query->getResult();
28
    }
29
}
30