Passed
Pull Request — master (#7)
by Koen
04:12
created

CantUpdate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A via() 0 3 1
A toMail() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Notifications\User\Email;
6
7
use App\Auth\EmailDispensary;
8
use App\Models\User;
9
use App\SPA\UrlGenerator;
10
use Illuminate\Notifications\Messages\MailMessage;
11
use Illuminate\Notifications\Notification;
12
use Illuminate\Support\Facades\Lang;
13
use function config;
14
15
final class CantUpdate extends Notification
16
{
17 2
    public function via(): array
18
    {
19 2
        return ['mail'];
20
    }
21
22 1
    public function toMail(User $user): MailMessage
0 ignored issues
show
Unused Code introduced by
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

22
    public function toMail(/** @scrutinizer ignore-unused */ User $user): MailMessage

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
    {
24 1
        return (new MailMessage())
25 1
            ->subject('Email address update request')
26 1
            ->line('You are receiving this email because you\'ve requested to change your email address.')
27 1
            ->line('Sadly, you already have an account with this email address in place and we are unable change it.');
28
    }
29
}
30