OrganisationRepository::findActive()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the vseth-semesterly-reports project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
/*
13
 * This file is part of the vseth-semesterly-reports project.
14
 *
15
 * (c) Florian Moser <[email protected]>
16
 *
17
 * For the full copyright and license information, please view the LICENSE
18
 * file that was distributed with this source code.
19
 */
20
21
namespace App\Repository;
22
23
use App\Entity\Organisation;
24
use Doctrine\ORM\EntityRepository;
25
26
class OrganisationRepository extends EntityRepository
27
{
28
    /**
29
     * @return Organisation[]
30
     */
31
    public function findHidden()
32
    {
33
        $qb = $this->createQueryBuilder('u');
34
        $qb->where('u.hiddenAt IS NOT NULL')
35
            ->orderBy('u.name', 'ASC');
36
37
        return $qb->getQuery()->getResult();
38
    }
39
40
    /**
41
     * @return Organisation[]
42
     */
43
    public function findActive()
44
    {
45
        $qb = $this->createQueryBuilder('u');
46
        $qb->where('u.hiddenAt IS NULL')
47
            ->orderBy('u.name', 'ASC');
48
49
        return $qb->getQuery()->getResult();
50
    }
51
}
52