Completed
Pull Request — master (#30)
by
unknown
05:03
created

EventRepository::findByGoogleId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
crap 2
1
<?php
2
3
namespace AppBundle\Repository;
4
5
/**
6
 * EventRepository.
7
 *
8
 * This class was generated by the Doctrine ORM. Add your own custom
9
 * repository methods below.
10
 */
11
class EventRepository extends \Doctrine\ORM\EntityRepository
12
{
13
    public function findByGoogleId($id)
14
    {
15
        return $this->createQueryBuilder('event')
16
            ->andWhere('event.googleId = :id')
17
            ->setParameter('id', $id)
18
            ->getQuery()
19
            ->getSingleResult();
20
    }
21
}
22