| Total Complexity | 7 | 
| Total Lines | 48 | 
| Duplicated Lines | 0 % | 
| Coverage | 93.75% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 7 | final class Find extends Base  | 
            ||
| 8 | { | 
            ||
| 9 | 1 | /**  | 
            |
| 10 | * @return array<string>  | 
            ||
| 11 | 1 | */  | 
            |
| 12 | public function getAll(): array  | 
            ||
| 13 |     { | 
            ||
| 14 | 2 | return $this->userRepository->getAllUsers();  | 
            |
| 15 | }  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @return array<string>  | 
            ||
| 19 | */  | 
            ||
| 20 | 2 | public function getUsersByPage(  | 
            |
| 21 | 1 | int $page,  | 
            |
| 22 | int $perPage,  | 
            ||
| 23 | 2 | ?string $name,  | 
            |
| 24 | 1 | ?string $email  | 
            |
| 25 |     ): array { | 
            ||
| 26 |         if ($page < 1) { | 
            ||
| 27 | 2 | $page = 1;  | 
            |
| 28 | 2 | }  | 
            |
| 29 |         if ($perPage < 1) { | 
            ||
| 30 | $perPage = self::DEFAULT_PER_PAGE_PAGINATION;  | 
            ||
| 31 | }  | 
            ||
| 32 | |||
| 33 | return $this->userRepository->getUsersByPage(  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 34 | $page,  | 
            ||
| 35 | 3 | $perPage,  | 
            |
| 36 | $name,  | 
            ||
| 37 | 3 | ||
| 38 | 3 | );  | 
            |
| 39 | }  | 
            ||
| 40 | |||
| 41 | public function getOne(int $userId): object  | 
            ||
| 42 |     { | 
            ||
| 43 | 2 |         if (self::isRedisEnabled() === true) { | 
            |
| 44 | $user = $this->getUserFromCache($userId);  | 
            ||
| 45 |         } else { | 
            ||
| 46 | 2 | $user = $this->getUserFromDb($userId)->toJson();  | 
            |
| 47 | }  | 
            ||
| 48 | 2 | ||
| 49 | return $user;  | 
            ||
| 50 | }  | 
            ||
| 51 | |||
| 52 | public function search(string $usersName): array  | 
            ||
| 55 | }  | 
            ||
| 56 | }  | 
            ||
| 57 |