GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

FileStatusController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 15
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A store() 0 12 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
namespace BristolSU\Module\UploadFile\Http\Controllers\AdminApi;
5
6
7
use BristolSU\Module\UploadFile\Events\StatusChanged;
8
use BristolSU\Module\UploadFile\Http\Controllers\Controller;
9
use BristolSU\Module\UploadFile\Models\File;
10
use BristolSU\Support\Activity\Activity;
11
use BristolSU\Support\Authentication\Contracts\Authentication;
12
use BristolSU\Support\ModuleInstance\ModuleInstance;
13
use Illuminate\Http\Request;
14
15
class FileStatusController extends Controller
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class FileStatusController
Loading history...
16
{
17
18 5
    public function store(Request $request, Authentication $authentication, Activity $activity, ModuleInstance $moduleInstance, File $file)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function store()
Loading history...
19
    {
20 5
        $this->authorize('admin.status.create');
21
        
22 4
        $status = $file->statuses()->create([
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
23 4
            'status' => $request->input('status'),
24 4
            'created_by' => $authentication->getUser()->id()
25
        ]);
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
26
        
27 4
        event(new StatusChanged($file));
28
        
29 4
        return $status;
30
    }
31
32
}