| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class KioskUserRepository implements KioskUserRepositoryInterface { |
||
| 9 | private $em; |
||
| 10 | |||
| 11 | 9 | public function __construct(EntityManagerInterface $em) { |
|
| 12 | 9 | $this->em = $em; |
|
| 13 | 9 | } |
|
| 14 | |||
| 15 | 3 | public function findOneByToken(string $token): ?KioskUser { |
|
| 16 | 3 | return $this->em |
|
| 17 | 3 | ->getRepository(KioskUser::class) |
|
| 18 | 3 | ->findOneBy([ |
|
| 19 | 3 | 'token' => $token |
|
| 20 | ]); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function findAll(): array { |
||
| 32 | } |
||
| 33 | |||
| 34 | public function persist(KioskUser $user): void { |
||
| 35 | $this->em->persist($user); |
||
| 36 | $this->em->flush(); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function remove(KioskUser $user): void { |
||
| 42 | } |
||
| 43 | } |