Total Complexity | 4 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 92.31% |
Changes | 0 |
1 | <?php |
||
8 | class EmailRequestFinder |
||
9 | { |
||
10 | private array $securitySettings; |
||
11 | |||
12 | 29 | public function __construct( |
|
17 | } |
||
18 | |||
19 | /** |
||
20 | * Retrieve email requests from given email or user. |
||
21 | * |
||
22 | * @param string $email |
||
23 | * @param int|null $userId |
||
24 | * |
||
25 | * @return int |
||
26 | */ |
||
27 | 15 | public function findEmailAmountInSetTimespan(string $email, ?int $userId): int |
|
35 | 15 | ); |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * Returns the very last EMAIL request from actual ip or given email. |
||
40 | * |
||
41 | * @param string $email |
||
42 | * |
||
43 | * @return int |
||
44 | */ |
||
45 | 6 | public function findLastEmailRequestTimestamp(string $email): int |
|
55 |