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

CustomerRepository::findUserByFacebookId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 7
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 9
rs 9.6666
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