VerifyUpdate::via()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 1
cts 1
cp 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Notifications\User\Email;
6
7
use App\Mail\User\Email\VerifyUpdate as VerifyUpdateMail;
8
use App\Models\User;
9
use Illuminate\Notifications\Notification;
10
11
final class VerifyUpdate extends Notification
12
{
13
    public string $token;
14
15
    private string $email;
16
17 3
    public function __construct(string $token, string $email)
18
    {
19 3
        $this->token = $token;
20 3
        $this->email = $email;
21
    }
22 2
23
    public function via(): array
24 2
    {
25
        return ['mail'];
26
    }
27 1
28
    public function toMail(User $user): VerifyUpdateMail
29 1
    {
30
        return new VerifyUpdateMail($user, $this->token, $this->email);
31 1
    }
32
}
33