Passed
Branch master (80e19c)
by Mathew
02:51
created

LaravelInvitesController   A

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 App\Http\Controllers\Controller;
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\Controller 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...
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