Passed
Push — develop ( 4cbaa0...09ba9e )
by Ngoding
05:32
created

VerifyEmailQueued   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A verificationUrl() 0 8 1
1
<?php
2
3
namespace App\Infrastructure\Auth\Notifications;
4
5
use Illuminate\Auth\Notifications\VerifyEmail as BaseVerifyEmail;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Support\Carbon;
9
use Illuminate\Support\Facades\Config;
10
use Illuminate\Support\Facades\URL;
11
12
class VerifyEmailQueued extends BaseVerifyEmail implements ShouldQueue
13
{
14
    use Queueable;
15
16
    /**
17
     * {@inheritDoc}
18
     */
19
    protected function verificationUrl($notifiable)
20
    {
21
        return URL::temporarySignedRoute(
22
            'verification.verify',
23
            Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
24
            [
25
                'id' => sha1($notifiable->getKeyForVerification()),
26
                'hash' => sha1($notifiable->getEmailForVerification()),
27
            ]
28
        );
29
    }
30
}
31