Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class UserRepository extends Select\Repository implements IdentityRepositoryInterface |
||
10 | { |
||
11 | private function findIdentityBy(string $field, string $value): ?IdentityInterface |
||
12 | { |
||
13 | return $this->findOne([$field => $value]); |
||
14 | } |
||
15 | |||
16 | public function findIdentity(string $id): ?IdentityInterface |
||
17 | { |
||
18 | return $this->findByPK($id); |
||
19 | } |
||
20 | |||
21 | public function findIdentityByToken(string $token, string $type): ?IdentityInterface |
||
22 | { |
||
23 | return $this->findIdentityBy('token', $token); |
||
24 | } |
||
25 | |||
26 | public function findByLogin(string $login): ?IdentityInterface |
||
29 | } |
||
30 | } |
||
31 |