Completed
Push — sf2.7 ( 18de34...b252b6 )
by Laurent
18:26
created

SubFamilyLogRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFromFamilyLog() 0 10 1
1
<?php
2
3
/**
4
 * Entité SubFamilyLog.
5
 *
6
 * PHP Version 5
7
 *
8
 * @author     Quétier Laurent <[email protected]>
9
 * @copyright  2014 Dev-Int GLSR
10
 * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
11
 *
12
 * @version    0.1.0
13
 *
14
 * @link       https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\Entity;
17
18
use Doctrine\ORM\EntityRepository;
19
20
/**
21
 * SubFamilyLogRepository Entité SubFamilyLog.
22
 *
23
 * @category   Entity
24
 */
25
class SubFamilyLogRepository extends EntityRepository
26
{
27
    /**
28
     * Renvoie la liste des sous-famille logistique attachées
29
     * à la famille logistique passée en paramètre.
30
     *
31
     * @param int $idFamLog id de la famille logistique
32
     *
33
     * @return array query result
34
     */
35
    public function getFromFamilyLog($idFamLog)
36
    {
37
        $query = $this->_em->createQuery(
38
            'SELECT sf FROM AppBundle:subFamilyLog sf '
39
            .'WHERE sf.familylogs = :id'
40
        );
41
        $query->setParameter('id', $idFamLog);
42
43
        return $query->getResult();
44
    }
45
}
46