Completed
Push — dev ( 124de7...d06c93 )
by nonanerz
9s
created

UserInternRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 11
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadUserByUsername() 0 8 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
6
7
/**
8
 * UserInternRepository.
9
 *
10
 * This class was generated by the Doctrine ORM. Add your own custom
11
 * repository methods below.
12
 */
13
class UserInternRepository extends \Doctrine\ORM\EntityRepository implements UserLoaderInterface
14
{
15
    public function loadUserByUsername($username)
16
    {
17
        return $this->createQueryBuilder('user')
18
            ->andWhere('user.apiToken = :username')
19
            ->setParameter('username', $username)
20
            ->getQuery()
21
            ->getOneOrNullResult();
22
    }
23
}
24