Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function find(int $uid) |
||
28 | { |
||
29 | $qb = $this->pool->getConnectionForTable($this->table)->createQueryBuilder(); |
||
30 | $qb->select('*')->from($this->table); |
||
31 | $qb->where($qb->expr()->eq('uid', ':uid')); |
||
32 | $qb->setParameter('uid', $uid); |
||
33 | $data = $qb->execute()->fetch(\PDO::FETCH_ASSOC); |
||
34 | |||
35 | if (\is_array($data)) { |
||
36 | return new FrontendUser($data); |
||
37 | } |
||
38 | |||
39 | return null; |
||
40 | } |
||
62 |