Completed
Push — master ( 5e4ebc...f96e76 )
by Florian
13s queued 11s
created

OrganisationRepository::findActive()   A

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
namespace App\Repository;
13
14
use App\Entity\Organisation;
15
use Doctrine\ORM\EntityRepository;
16
17
class OrganisationRepository extends EntityRepository
18
{
19
    /**
20
     * @return Organisation[]
21
     */
22
    public function findHidden()
23
    {
24
        $qb = $this->createQueryBuilder('u');
25
        $qb->where('u.hiddenAt IS NOT NULL')
26
            ->orderBy('u.name', 'ASC');
27
28
        return $qb->getQuery()->getResult();
29
    }
30
31
    /**
32
     * @return Organisation[]
33
     */
34
    public function findActive()
35
    {
36
        $qb = $this->createQueryBuilder('u');
37
        $qb->where('u.hiddenAt IS NULL')
38
            ->orderBy('u.name', 'ASC');
39
40
        return $qb->getQuery()->getResult();
41
    }
42
}
43