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

CustomerRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
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 16
rs 10
wmc 1
lcom 0
cbo 2

1 Method

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