LaravelInvitesController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A accept() 0 8 1
A __construct() 0 3 1
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