LaravelInvitesController::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace mathewparet\LaravelInvites\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
7
use mathewparet\LaravelInvites\Http\Controllers\Controller;
8
9
use mathewparet\LaravelInvites\Facades\LaravelInvites;
10
11
class LaravelInvitesController extends Controller
12
{
13
    public function __construct()
14
    {
15
        $this->middleware('signed');
16
    }
17
18
    public function accept(Request $request)
19
    {
20
        LaravelInvites::check($request->query('code'), $request->query('email'));
0 ignored issues
show
Bug introduced by
The method check() does not exist on mathewparet\LaravelInvites\Facades\LaravelInvites. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        LaravelInvites::/** @scrutinizer ignore-call */ 
21
                        check($request->query('code'), $request->query('email'));
Loading history...
21
        
22
        $request->session()->put('_old_input.'.config('laravelinvites.fields.code'), $request->query('code'));
23
        $request->session()->put('_old_input.'.config('laravelinvites.fields.email'), $request->query('email'));
24
25
        return redirect()->route(config('laravelinvites.routes.register'));
26
    }
27
}
28