Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 2 | public static function canSendToEmail(string $email): bool |
|
11 | { |
||
12 | /** @var WrongEmail[]|Collection $emails */ |
||
13 | 2 | $emails = WrongEmail::active() |
|
14 | 2 | ->bounced() |
|
15 | 2 | ->where('email', '=', $email) |
|
16 | 2 | ->get(); |
|
17 | |||
18 | 2 | foreach ($emails as $wrongEmail) { |
|
19 | 1 | if (! $wrongEmail->canBouncedSend()) { |
|
20 | 1 | return false; |
|
21 | } |
||
22 | } |
||
23 | |||
24 | 1 | return true; |
|
25 | } |
||
27 |