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

CustomerRepository::findUsernameByApiKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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