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)

ParticipantApi/AssignController/DestroyRequest.php (9 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\AssignRoles\Http\Requests\ParticipantApi\AssignController;
4
5
use BristolSU\Module\AssignRoles\Rules\RoleBelongsToGroup;
6
use BristolSU\Module\AssignRoles\Rules\UserBelongsToRole;
7
use BristolSU\Module\AssignRoles\Rules\UserIsNotLoggedIntoRole;
8
use BristolSU\Support\Authentication\Contracts\Authentication;
9
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
10
use Illuminate\Contracts\Validation\Validator;
11
use Illuminate\Foundation\Http\FormRequest;
12
13
class DestroyRequest extends FormRequest
0 ignored issues
show
Missing doc comment for class DestroyRequest
Loading history...
14
{
15
16 6
    public function validator(ValidationFactory $factory) 
0 ignored issues
show
Missing doc comment for function validator()
Loading history...
17
    {
18 6
        return $factory->make(
19 6
            ['role' => $this->route('role'), 'user' => $this->route('user')], 
20
            [
21 6
                'role' => ['required', app(RoleBelongsToGroup::class)],
22 6
                'user' => ['required', app(UserBelongsToRole::class, ['roleId' => $this->route('role')])]
23
            ]
24
        );
25
    }
26
27 6
    public function withValidator(Validator $validator)
0 ignored issues
show
Missing doc comment for function withValidator()
Loading history...
28
    {
29
        $validator->sometimes('role', app(UserIsNotLoggedIntoRole::class), function($input) {
0 ignored issues
show
app(BristolSU\Module\Ass...tLoggedIntoRole::class) of type BristolSU\Module\AssignR...UserIsNotLoggedIntoRole is incompatible with the type array|string expected by parameter $rules of Illuminate\Validation\Validator::sometimes(). ( Ignorable by Annotation )

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

29
        $validator->sometimes('role', /** @scrutinizer ignore-type */ app(UserIsNotLoggedIntoRole::class), function($input) {
Loading history...
The parameter $input is not used and could be removed. ( Ignorable by Annotation )

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

29
        $validator->sometimes('role', app(UserIsNotLoggedIntoRole::class), function(/** @scrutinizer ignore-unused */ $input) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
30 6
            return app(Authentication::class)->getUser()->id() === (int) $this->route('user');
31 6
        });
0 ignored issues
show
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...
32 6
    }
33
34
}