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::getUserFromCookie()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
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