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/PositionObserverCascadeDelete.php (14 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Observers;
4
5
use BristolSU\ControlDB\Contracts\Models\Position;
6
use BristolSU\ControlDB\Contracts\Repositories\Pivots\Tags\PositionPositionTag;
7
use BristolSU\ControlDB\Contracts\Repositories\Role;
8
9
class PositionObserverCascadeDelete
0 ignored issues
show
Missing doc comment for class PositionObserverCascadeDelete
Loading history...
10
{
11
12
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
13
     * @var Role
14
     */
15
    private $roleRepository;
0 ignored issues
show
Private member variable "roleRepository" must be prefixed with an underscore
Loading history...
16
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
17
     * @var PositionPositionTag
18
     */
19
    private $positionPositionTag;
0 ignored issues
show
Private member variable "positionPositionTag" must be prefixed with an underscore
Loading history...
20
21 4
    public function __construct(Role $roleRepository, PositionPositionTag $positionPositionTag)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
22
    {
23 4
        $this->roleRepository = $roleRepository;
24 4
        $this->positionPositionTag = $positionPositionTag;
25 4
    }
26
27 1
    public function delete(Position $position)
0 ignored issues
show
Missing doc comment for function delete()
Loading history...
28
    {
29 1
        $this->deleteRoles($position);
30 1
        $this->removeTags($position);
31 1
    }
32
33 1
    private function deleteRoles(Position $position)
0 ignored issues
show
Private method name "PositionObserverCascadeDelete::deleteRoles" must be prefixed with an underscore
Loading history...
Missing doc comment for function deleteRoles()
Loading history...
34
    {
35 1
        foreach($this->roleRepository->allThroughPosition($position) as $role) {
0 ignored issues
show
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
36
            $this->roleRepository->delete($role->id());
37
        }
38 1
    }
39
40 1
    private function removeTags(Position $position)
0 ignored issues
show
Private method name "PositionObserverCascadeDelete::removeTags" must be prefixed with an underscore
Loading history...
Missing doc comment for function removeTags()
Loading history...
41
    {
42 1
        foreach($this->positionPositionTag->getTagsThroughPosition($position) as $tag) {
0 ignored issues
show
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
43
            $this->positionPositionTag->removeTagFromPosition($tag, $position);
44
        }
45 1
    }
46
47
}