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 ( a00bce )
by Pedro
13:44
created

VerifyEmailController::resendVerificationEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 7
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Backpack\CRUD\app\Http\Controllers\Auth;
4
5
use App\Http\Requests\Request;
0 ignored issues
show
Bug introduced by
The type App\Http\Requests\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Routing\Controller;
7
use Illuminate\Foundation\Auth\EmailVerificationRequest;
8
use Prologue\Alerts\Facades\Alert;
9
10
class VerifyEmailController extends Controller
11
{
12
    public null|string $redirectTo = null;
13
    /**
14
     * Create a new controller instance.
15
     *
16
     * @return void
17
     */
18
    public function __construct()
19
    {
20
        $this->middleware(backpack_middleware());
21
        $this->middleware('signed')->only('verifyEmail');
22
        $this->middleware('throttle:6,1')->only('resendVerificationEmail');
23
24
        if (! backpack_users_have_email()) {
25
            abort(501, trans('backpack::base.no_email_column'));
26
        }
27
        // where to redirect after the email is verified
28
        $this->redirectTo = property_exists($this, 'redirectTo') && $this->redirectTo ? $this->redirectTo : backpack_url('dashboard');
29
    }
30
31
    public function emailVerificationRequired()
32
    {
33
        return view(backpack_view('auth.verify-email'));
34
    }
35
36
    /**
37
     * Verify the user's email address.
38
     *
39
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
40
     */
41
    public function verifyEmail(EmailVerificationRequest $request) 
42
    {
43
        $request->fulfill();
44
45
        return redirect($this->redirectTo);
46
    }
47
48
    /**
49
     * Resend the email verification notification.
50
     */
51
    public function resendVerificationEmail(Request $request) : \Illuminate\Http\RedirectResponse
52
    {
53
        $request->user(backpack_guard_name())->sendEmailVerificationNotification();
54
        
55
        Alert::success('Email verification link sent successfully.')->flash();
56
57
        return back()->with('status', 'verification-link-sent');  
58
    }
59
}