Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 4 | public function findByToken($token) |
|
37 | { |
||
38 | 4 | $qb = $this->createQueryBuilder('el'); |
|
39 | |||
40 | 4 | $qb->where('el.token = :token'); |
|
41 | 4 | $qb->setParameter('token', $token); |
|
42 | |||
43 | 4 | $query = $qb->getQuery(); |
|
44 | 4 | $result = $query->getResult(); |
|
45 | 4 | return count($result) ? $result[0] : null; |
|
46 | } |
||
47 | } |
||
48 |