Completed
Push — master ( 1063d7...a7489f )
by Laurent
03:16
created

UnitStorageRepository::getAllItems()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
/**
4
 * Entité UnitStorage.
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 GIT: <git_id>
13
 *
14
 * @link https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\Repository\Settings\Diverse;
17
18
use Doctrine\ORM\EntityRepository;
19
20
/**
21
 * UnitStorageRepository Entité UnitStorage.
22
 *
23
 * PHP Version 5
24
 *
25
 * @category Entity
26
 */
27
class UnitStorageRepository extends EntityRepository
28
{
29
    /**
30
     * Affiche toutes les unités.
31
     *
32
     * @return QueryBuilder Requête DQL
33
     */
34
    public function getAllItems()
35
    {
36
        $query = $this->createQueryBuilder('u')
37
            ->orderBy('u.name', 'ASC');
38
        
39
        return $query;
40
    }
41
42
    /**
43
     * Affiche les unités actifs.
44
     *
45
     * @return QueryBuilder Requête DQL
46
     */
47
    public function getItems()
48
    {
49
        $query = $this->getAllItems();
50
51
        return $query;
52
    }
53
}
54