Completed
Pull Request — master (#137)
by
unknown
15:28
created

CustomerRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A findUsernameByApiKey() 0 9 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
use phpDocumentor\Reflection\Types\Object_;
6
7
class CustomerRepository extends \Doctrine\ORM\EntityRepository
8
{
9
    /**
10
     * @param  string $param
11
     * @return Object
12
     */
13
14
    public function findUsernameByApiKey($param)
15
    {
16
        return $this->createQueryBuilder('c')
17
            ->select('c')
18
            ->where('c.apiKey = :param')
19
            ->setParameter(':param', $param)
20
            ->getQuery()
21
            ->getOneOrNullResult();
22
    }
23
}
24