Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 1 | Features | 3 |
1 | <?php |
||
39 | public function retrieveByHash($hash) |
||
40 | { |
||
41 | return $this->tokenRepository |
||
42 | ->createQueryBuilder('t') |
||
43 | ->where('t.hash = :hash') |
||
44 | ->setParameter('hash', $hash) |
||
45 | ->andWhere('t.expireAt > :now') |
||
46 | ->setParameter('now', $this->clock->now()) |
||
47 | ->getQuery() |
||
48 | ->setMaxResults(1) |
||
49 | ->getOneOrNullResult() |
||
50 | ; |
||
51 | } |
||
52 | |||
67 |