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/RoleObserverClearCache.php (8 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\Role as RoleCache;
6
use BristolSU\ControlDB\Contracts\Models\Role as RoleModel;
7
use Illuminate\Contracts\Cache\Repository;
8
9
class RoleObserverClearCache
0 ignored issues
show
Missing doc comment for class RoleObserverClearCache
Loading history...
10
{
11
12
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
13
     * @var Repository
14
     */
15
    private $cache;
0 ignored issues
show
Private member variable "cache" must be prefixed with an underscore
Loading history...
16
17 8
    public function __construct(Repository $cache)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
18
    {
19 8
        $this->cache = $cache;
20 8
    }
21
22 2
    public function create(RoleModel $roleModel)
0 ignored issues
show
Missing doc comment for function create()
Loading history...
23
    {
24 2
        $this->cache->forget(RoleCache::class . '@count');
25 2
        $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $roleModel->dataProviderId());
26 2
        $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $roleModel->groupId());
27 2
        $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $roleModel->positionId());
28 2
    }
29
30 1
    public function delete(RoleModel $role)
0 ignored issues
show
Missing doc comment for function delete()
Loading history...
31
    {
32 1
        $this->cache->forget(RoleCache::class . '@count');
33 1
        $this->cache->forget(RoleCache::class . '@getById:' . $role->id());
34 1
        $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $role->dataProviderId());
35 1
        $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $role->groupId());
36 1
        $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $role->positionId());
37 1
    }
38
39 5
    public function update(RoleModel $oldRole, RoleModel $newRole)
0 ignored issues
show
Missing doc comment for function update()
Loading history...
40
    {
41 5
        $this->cache->forget(RoleCache::class . '@count');
42 5
        $this->cache->forget(RoleCache::class . '@getById:' . $newRole->id());
43 5
        $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $oldRole->dataProviderId());
44 5
        $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $newRole->dataProviderId());
45 5
        $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $oldRole->positionId());
46 5
        $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $newRole->positionId());
47 5
        $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $oldRole->groupId());
48 5
        $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $newRole->groupId());
49 5
    }
50
    
51
}