Completed
Pull Request — master (#137)
by
unknown
11:18
created

CustomerRepository::findOneByApiKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 9
rs 9.6666
1
<?php
2
3
namespace AppBundle\Repository;
4
5
class CustomerRepository extends \Doctrine\ORM\EntityRepository
6
{
7
    /**
8
     * @param  string $param
9
     * @return object
10
     */
11
    public function findOneByApiKey($param)
12
    {
13
        return $this->createQueryBuilder('c')
14
            ->select('c')
15
            ->where('c.apiKey = :param')
16
            ->setParameter(':param', $param)
17
            ->getQuery()
18
            ->getOneOrNullResult();
19
    }
20
}
21