VerifyUpdate   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 20
rs 10
ccs 7
cts 7
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A via() 0 3 1
A __construct() 0 4 1
A toMail() 0 3 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