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

CantUpdate::toMail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
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