ListController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 10 2
1
<?php
2
3
namespace UserAdmin\Http\Controllers;
4
5
use UserAdmin\Facades\UserAdmin;
6
use UserAdmin\Http\Requests\ListRequest;
7
use UserAdmin\IndexPage\IndexPage;
8
9
class ListController
10
{
11 3
    public function __invoke(ListRequest $request)
12
    {
13
        /** @var IndexPage $page */
14 3
        $page = UserAdmin::indexPage()->resolve($request->input(config('user-adminboard.pagename_key')));
0 ignored issues
show
Bug introduced by
The method indexPage() does not exist on UserAdmin\Facades\UserAdmin. 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

14
        $page = UserAdmin::/** @scrutinizer ignore-call */ indexPage()->resolve($request->input(config('user-adminboard.pagename_key')));
Loading history...
15
16 3
        if (!$page->authorised($request)) {
17 1
            abort(403);
18
        }
19
20 2
        return $page->process($request);
21
    }
22
}
23