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.

ParticipantPageController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 13 2
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\AssignRoles\Http\Controllers;
4
5
use BristolSU\Module\AssignRoles\Support\PositionSettingRetrieval;
6
use BristolSU\Module\AssignRoles\Support\SettingRetrievalException;
7
use BristolSU\Support\Authentication\Contracts\Authentication;
8
9
class ParticipantPageController extends Controller
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class ParticipantPageController
Loading history...
10
{
11
12
    public function index(Authentication $authentication)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function index()
Loading history...
13
    {
14
        $this->authorize('view-page');
15
        
16
        try {
17
            $setting = app(PositionSettingRetrieval::class)->getSettings(
18
                $authentication->getGroup()
0 ignored issues
show
Bug introduced by
It seems like $authentication->getGroup() can also be of type null; however, parameter $group of BristolSU\Module\AssignR...etrieval::getSettings() does only seem to accept BristolSU\ControlDB\Contracts\Models\Group, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
                /** @scrutinizer ignore-type */ $authentication->getGroup()
Loading history...
19
            );
20
            $setting = app(PositionSettingRetrieval::class)->parse($setting);
21
        } catch (SettingRetrievalException $e) {
22
            return view('assign-roles::nosettings');
23
        }
24
        return view('assign-roles::participant')->with('positionSetting', $setting);
25
    }
26
    
27
}