Conditions | 3 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 | ); |
|
57 |