Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — add-email-confirmation ( 52c134...669823 )
by Pedro
26:47 queued 11:49
created

EmailVerificationRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 5
dl 0
loc 13
rs 10
c 1
b 1
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
A getUserFromCookie() 0 6 2
1
<?php
2
3
namespace Backpack\CRUD\app\Http\Requests;
4
5
use Illuminate\Foundation\Auth\EmailVerificationRequest as OriginalEmailVerificationRequest;
6
use Illuminate\Support\Facades\Cookie;
7
8
class EmailVerificationRequest extends OriginalEmailVerificationRequest
9
{
10
    public function user($guard = null)
11
    {
12
        return parent::user(backpack_guard_name()) ?? $this->getUserFromCookie();
13
    }
14
15
    private function getUserFromCookie()
16
    {
17
        if (Cookie::has('backpack_email_verification')) {
18
            return config('backpack.base.user_model_fqn')::where('email', Cookie::get('backpack_email_verification'))->first();
19
        }
20
        return null;
21
    }
22
}
23