Completed
Pull Request — master (#137)
by
unknown
12:51
created

CustomerRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 22
rs 10
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findUsernameByApiKey() 0 9 1
A findUserByFacebookId() 0 9 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
/**
6
 * CustomerRepository.
7
 *
8
 * This class was generated by the Doctrine ORM. Add your own custom
9
 * repository methods below.
10
 */
11
class CustomerRepository extends \Doctrine\ORM\EntityRepository
12
{
13
    public function findUsernameByApiKey($param)
14
    {
15
        return $this->createQueryBuilder('c')
16
            ->select('c')
17
            ->where('c.apiKey = :param')
18
            ->setParameter(':param', $param)
19
            ->getQuery()
20
            ->getOneOrNullResult();
21
    }
22
23
    public function findUserByFacebookId($param)
24
    {
25
        return $this->createQueryBuilder('c')
26
            ->select('c')
27
            ->where('c.facebookID = :param')
28
            ->setParameter(':param', $param)
29
            ->getQuery()
30
            ->getOneOrNullResult();
31
    }
32
}
33