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