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 (4568)

src/Observers/UserObserverCascadeDelete.php (19 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Observers;
4
5
use BristolSU\ControlDB\Cache\Pivots\Tags\UserUserTag;
6
use BristolSU\ControlDB\Contracts\Models\User;
7
use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserGroup;
8
use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserRole;
9
10
class UserObserverCascadeDelete
0 ignored issues
show
Missing doc comment for class UserObserverCascadeDelete
Loading history...
11
{
12
13
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
14
     * @var UserGroup
15
     */
16
    private $userGroup;
0 ignored issues
show
Private member variable "userGroup" must be prefixed with an underscore
Loading history...
17
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
18
     * @var UserUserTag
19
     */
20
    private $userUserTag;
0 ignored issues
show
Private member variable "userUserTag" must be prefixed with an underscore
Loading history...
21
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
22
     * @var UserRole
23
     */
24
    private $userRole;
0 ignored issues
show
Private member variable "userRole" must be prefixed with an underscore
Loading history...
25
26 4
    public function __construct(UserGroup $userGroup, UserRole $userRole, UserUserTag $userUserTag)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
27
    {
28 4
        $this->userGroup = $userGroup;
29 4
        $this->userUserTag = $userUserTag;
30 4
        $this->userRole = $userRole;
31 4
    }
32
33 1
    public function delete(User $user)
0 ignored issues
show
Missing doc comment for function delete()
Loading history...
34
    {
35 1
        $this->removeGroups($user);
36 1
        $this->removeTags($user);
37 1
        $this->removeRoles($user);
38 1
    }
39
40 1
    private function removeGroups(User $user)
0 ignored issues
show
Private method name "UserObserverCascadeDelete::removeGroups" must be prefixed with an underscore
Loading history...
Missing doc comment for function removeGroups()
Loading history...
41
    {
42 1
        foreach($this->userGroup->getGroupsThroughUser($user) as $group) {
0 ignored issues
show
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
43
            $this->userGroup->removeUserFromGroup($user, $group);
44
        }
45 1
    }
46
47 1
    private function removeTags(User $user)
0 ignored issues
show
Private method name "UserObserverCascadeDelete::removeTags" must be prefixed with an underscore
Loading history...
Missing doc comment for function removeTags()
Loading history...
48
    {
49 1
        foreach($this->userUserTag->getTagsThroughUser($user) as $tag) {
0 ignored issues
show
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
50
            $this->userUserTag->removeTagFromUser($tag, $user);
51
        }
52 1
    }
53
54 1
    private function removeRoles(User $user)
0 ignored issues
show
Private method name "UserObserverCascadeDelete::removeRoles" must be prefixed with an underscore
Loading history...
Missing doc comment for function removeRoles()
Loading history...
55
    {
56 1
        foreach($this->userRole->getRolesThroughUser($user) as $role) {
0 ignored issues
show
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
57
            $this->userRole->removeUserFromRole($user, $role);
58
        }
59 1
    }
60
61
}