Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
AddNewUserReminder | |
0.00% |
0 / 11 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
handle | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Jobs\Emails; |
4 | |
5 | use App\Mail\AdminCenterAddNewUserReminder; |
6 | use App\Services\Email\EmailService; |
7 | use Illuminate\Bus\Queueable; |
8 | use Illuminate\Contracts\Queue\ShouldQueue; |
9 | use Illuminate\Foundation\Bus\Dispatchable; |
10 | use Illuminate\Queue\InteractsWithQueue; |
11 | use Illuminate\Queue\SerializesModels; |
12 | |
13 | class AddNewUserReminder implements ShouldQueue |
14 | { |
15 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; |
16 | |
17 | public $tries = 3; |
18 | public $retryAfter = 60; |
19 | |
20 | /** |
21 | * Create a new job instance. |
22 | */ |
23 | public function __construct( |
24 | private readonly string $email, |
25 | private readonly string $password, |
26 | private readonly string $adminEmail, |
27 | private readonly string $password_expiry, |
28 | private readonly EmailService $emailService |
29 | ) { |
30 | // |
31 | } |
32 | |
33 | /** |
34 | * Execute the job. |
35 | */ |
36 | public function handle(): void |
37 | { |
38 | $this->emailService->send( |
39 | $this->email, |
40 | new AdminCenterAddNewUserReminder( |
41 | email: $this->email, |
42 | password: $this->password, |
43 | admin_email: $this->adminEmail, |
44 | password_expiry: $this->password_expiry |
45 | ), |
46 | 'cac_add_new_user_reminder' |
47 | ); |
48 | } |
49 | } |