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.

Issues (472)

app/Http/Controllers/ParticipantPageController.php (4 issues)

1
<?php
2
0 ignored issues
show
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
Missing doc comment for class ParticipantPageController
Loading history...
10
{
11
12
    public function index(Authentication $authentication)
0 ignored issues
show
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
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
}