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

VerifyEmailQueued::verificationUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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