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/Cache/Role.php (49 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Cache;
4
5
use BristolSU\ControlDB\Contracts\Models\Role as RoleModel;
6
use BristolSU\ControlDB\Contracts\Repositories\Role as RoleRepositoryContract;
7
use Illuminate\Contracts\Cache\Repository;
8
use Illuminate\Support\Collection;
9
10
class Role implements RoleRepositoryContract
0 ignored issues
show
Missing doc comment for class Role
Loading history...
11
{
12
13
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
14
     * @var RoleRepositoryContract
15
     */
16
    private $roleRepository;
0 ignored issues
show
Private member variable "roleRepository" must be prefixed with an underscore
Loading history...
17
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
18
     * @var Repository
19
     */
20
    private $cache;
0 ignored issues
show
Private member variable "cache" must be prefixed with an underscore
Loading history...
21
22 58
    public function __construct(RoleRepositoryContract $roleRepository, Repository $cache)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
23
    {
24 58
        $this->roleRepository = $roleRepository;
25 58
        $this->cache = $cache;
26 58
    }
27
28
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $id should have a doc-comment as per coding-style.
Loading history...
29
     * @inheritDoc
30
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
31 23
    public function getById(int $id): RoleModel
32
    {
33
        return $this->cache->rememberForever(static::class . '@getById:' . $id, function() use ($id) {
0 ignored issues
show
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...
34 23
            return $this->roleRepository->getById($id);
35 23
        });
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...
36
    }
37
38
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
39
     * @inheritDoc
40
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
41 2
    public function all(): Collection
42
    {
43 2
        return $this->roleRepository->all();
44
    }
45
46
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $dataProviderId should have a doc-comment as per coding-style.
Loading history...
47
     * @inheritDoc
48
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
49 3
    public function getByDataProviderId(int $dataProviderId): RoleModel
50
    {
51
        return $this->cache->rememberForever(static::class . '@getByDataProviderId:' . $dataProviderId, function() use ($dataProviderId) {
0 ignored issues
show
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...
52 3
            return $this->roleRepository->getByDataProviderId($dataProviderId);
53 3
        });
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...
54
    }
55
56
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $positionId should have a doc-comment as per coding-style.
Loading history...
Parameter $groupId should have a doc-comment as per coding-style.
Loading history...
Parameter $dataProviderId should have a doc-comment as per coding-style.
Loading history...
57
     * @inheritDoc
58
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
59 3
    public function create(int $positionId, int $groupId, int $dataProviderId): RoleModel
60
    {
61 3
        return $this->roleRepository->create($positionId, $groupId, $dataProviderId);
62
    }
63
64
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $id should have a doc-comment as per coding-style.
Loading history...
65
     * @inheritDoc
66
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
67 2
    public function delete(int $id): void
68
    {
69 2
        $this->roleRepository->delete($id);
70 2
    }
71
72
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $group should have a doc-comment as per coding-style.
Loading history...
73
     * @inheritDoc
74
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
75 5
    public function allThroughGroup(\BristolSU\ControlDB\Contracts\Models\Group $group): Collection
76
    {
77
        return $this->cache->rememberForever(static::class . '@allThroughGroup:' . $group->id(), function() use ($group) {
0 ignored issues
show
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...
78 5
            return $this->roleRepository->allThroughGroup($group);
79 5
        });
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...
80
    }
81
82
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $position should have a doc-comment as per coding-style.
Loading history...
83
     * @inheritDoc
84
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
85 5
    public function allThroughPosition(\BristolSU\ControlDB\Contracts\Models\Position $position): Collection
86
    {
87
        return $this->cache->rememberForever(static::class . '@allThroughPosition:' . $position->id(), function() use ($position) {
0 ignored issues
show
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...
88 5
            return $this->roleRepository->allThroughPosition($position);
89 5
        });
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...
90
    }
91
92
    /**
93
     * Paginate through all the roles
94
     *
95
     * @param int $page The page number to return
0 ignored issues
show
Expected 4 spaces after parameter name; 1 found
Loading history...
96
     * @param int $perPage The number of results to return per page
97
     *
98
     * @return Collection|RoleModel[]
99
     */
100 3
    public function paginate(int $page, int $perPage): Collection
101
    {
102 3
        return $this->roleRepository->paginate($page, $perPage);
103
    }
104
105
    /**
106
     * Get the number of roles
107
     *
108
     * @return int
109
     */
110 3
    public function count(): int
111
    {
112
        return $this->cache->rememberForever(static::class . '@count', function() {
0 ignored issues
show
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...
113 3
            return $this->roleRepository->count();
114 3
        });
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...
115
        
116
    }
117
118
    /**
119
     * Update the role model
120
     *
121
     * @param int $id
0 ignored issues
show
Missing parameter comment
Loading history...
122
     * @param int $positionId
0 ignored issues
show
Missing parameter comment
Loading history...
123
     * @param int $groupId
0 ignored issues
show
Missing parameter comment
Loading history...
124
     * @param int $dataProviderId New data provider ID
125
     * @return RoleModel
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
126
     */
127 6
    public function update(int $id, int $positionId, int $groupId, int $dataProviderId): RoleModel
128
    {
129 6
        return $this->roleRepository->update($id, $positionId, $groupId, $dataProviderId);
130
    }
131
}