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/Rules/RoleHasNoUsersAssigned.php (11 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\AssignRoles\Rules;
4
5
use BristolSU\ControlDB\Contracts\Repositories\Role;
6
use Illuminate\Contracts\Validation\Rule;
7
8
class RoleHasNoUsersAssigned implements Rule
0 ignored issues
show
Missing doc comment for class RoleHasNoUsersAssigned
Loading history...
9
{
10
11
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
12
     * @var Role
13
     */
14
    private $roleRepository;
0 ignored issues
show
Private member variable "roleRepository" must be prefixed with an underscore
Loading history...
15
16 4
    public function __construct(Role $roleRepository)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
17
    {
18 4
        $this->roleRepository = $roleRepository;
19 4
    }
20
21
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $attribute should have a doc-comment as per coding-style.
Loading history...
Parameter $value should have a doc-comment as per coding-style.
Loading history...
22
     * @inheritDoc
23
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
24 4
    public function passes($attribute, $value)
25
    {
26 4
        $role = $this->roleRepository->getById($value);
27 4
        return $role->users()->count() === 0;
28
    }
29
30
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
31
     * @inheritDoc
32
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
33 1
    public function message()
34
    {
35 1
        return 'The role still has users assigned';
36
    }
37
}