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