Code Duplication    Length = 10-10 lines in 2 locations

src/AppBundle/Repository/CustomerRepository.php 2 locations

@@ 14-23 (lines=10) @@
11
class CustomerRepository extends \Doctrine\ORM\EntityRepository
12
{
13
    public $apiKey;
14
    public function findUsernameByApiKey($apiKey){
15
        $qb = $this->createQueryBuilder('u');
16
        $qb->select('u.username,u.id')
17
            // ->from('User', 'u')
18
            ->where('u.apiKey =:api')
19
            ->setParameter('api', $apiKey);
20
        //->getQuery()
21
        //->getResult();
22
        return $qb->getQuery()->getResult();
23
    }
24
    public $id;
25
    public function findUserByFacebookId($id){
26
        $qb = $this->createQueryBuilder('u');
@@ 25-34 (lines=10) @@
22
        return $qb->getQuery()->getResult();
23
    }
24
    public $id;
25
    public function findUserByFacebookId($id){
26
        $qb = $this->createQueryBuilder('u');
27
        $qb->select('u.id, u.username, u.facebookID')
28
            // ->from('User', 'u')
29
            ->where('u.facebookID =:name')
30
            ->setParameter('name', $id);
31
        //->getQuery()
32
        //->getResult();
33
        return $qb->getQuery()->getResult();
34
    }
35
}
36