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

InventoryArticlesRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getArticlesFromInventory() 0 8 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
use AppBundle\Entity\Inventory;
7
8
/**
9
 * InventoryArticlesRepository
10
 *
11
 * This class was generated by the Doctrine ORM. Add your own custom
12
 * repository methods below.
13
 */
14
class InventoryArticlesRepository extends EntityRepository
15
{
16
    public function getArticlesFromInventory(Inventory $inventory) {
17
        $query = $this->createQueryBuilder('i')
18
            ->where('i.inventory = :id')
19
            ->setParameter('id', $inventory->getId())
20
            ->getQuery();
21
        
22
        return $query->getResult();
23
    }
24
}
25