BulkActionController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
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 13
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 11 2
1
<?php
2
3
namespace UserAdmin\Http\Controllers;
4
5
use UserAdmin\Facades\UserAdmin;
6
use UserAdmin\Http\Requests\BulkActionRequest;
7
use UserAdmin\IndexPage\IndexPage;
8
9
class BulkActionController
10
{
11 3
    public function __invoke(BulkActionRequest $request)
12
    {
13
14
        /** @var IndexPage $page */
15 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

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