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
Pull Request — main (#5301)
by Pedro
25:57 queued 12:24
created

VerifyEmailController::__construct()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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