OrganisationRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findActive() 0 7 1
A findHidden() 0 7 1
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