Completed
Push — master ( b2b032...858bee )
by Pavel
09:16 queued 06:10
created

UserRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 0 Features 4
Metric Value
wmc 2
c 4
b 0
f 4
lcom 0
cbo 2
dl 0
loc 21
ccs 13
cts 13
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findUsersWithoutRole() 0 9 1
A findChoiceModules() 0 8 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
/**
6
 * UserRepository
7
 *
8
 * This class was generated by the Doctrine ORM. Add your own custom
9
 * repository methods below.
10
 */
11
class UserRepository extends \Doctrine\ORM\EntityRepository
12
{
13 1
    public function findUsersWithoutRole($role)
14
    {
15 1
        return $this->createQueryBuilder('user')
16 1
            ->andWhere('user.role <> :role')
17 1
            ->setParameter('role', $role)
18 1
            ->getQuery()
19 1
            ->getResult()
20 1
            ;
21
    }
22
23 1
    public function findChoiceModules($module)
24
    {
25 1
        return $this->createQueryBuilder('u')
26 1
            ->where('u.chosenModule LIKE :module')
27 1
            ->setParameter('module', '%"'.$module.'"%')
28 1
            ->getQuery()
29 1
            ->getResult();
30
    }
31
}
32