| Total Complexity | 7 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 86.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class UserRepository extends Select\Repository |
||
| 14 | { |
||
| 15 | private EntityWriter $entityWriter; |
||
| 16 | |||
| 17 | 11 | public function __construct(Select $select, EntityWriter $entityWriter) |
|
| 18 | { |
||
| 19 | 11 | $this->entityWriter = $entityWriter; |
|
| 20 | 11 | parent::__construct($select); |
|
| 21 | } |
||
| 22 | |||
| 23 | 1 | public function findAll(array $scope = [], array $orderBy = []): DataReaderInterface |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $id |
||
| 30 | * |
||
| 31 | * @return User|null |
||
| 32 | */ |
||
| 33 | public function findById(string $id): ?User |
||
| 36 | } |
||
| 37 | |||
| 38 | 3 | public function findByLogin(string $login): ?User |
|
| 39 | { |
||
| 40 | 3 | return $this->findBy('login', $login); |
|
| 41 | } |
||
| 42 | |||
| 43 | 4 | public function findByLoginWithAuthIdentity(string $login): ?User |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @throws Throwable |
||
| 50 | */ |
||
| 51 | 2 | public function save(User $user): void |
|
| 54 | } |
||
| 55 | |||
| 56 | 3 | private function findBy(string $field, string $value): ?User |
|
| 59 | } |
||
| 60 | } |
||
| 61 |