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.
Passed
Push — master ( 94f430...c07b11 )
by Toby
44:45 queued 28:18
created

DataUserObserverClearCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A update() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Observers;
4
5
use BristolSU\ControlDB\Cache\DataUser as DataUserCache;
6
use BristolSU\ControlDB\Contracts\Models\DataUser;
7
use Illuminate\Contracts\Cache\Repository;
8
9
class DataUserObserverClearCache
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class DataUserObserverClearCache
Loading history...
10
{
11
12
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
13
     * @var Repository
14
     */
15
    private $cache;
0 ignored issues
show
Coding Style introduced by
Private member variable "cache" must be prefixed with an underscore
Loading history...
16
17 9
    public function __construct(Repository $cache)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
18
    {
19 9
        $this->cache = $cache;
20 9
    }
21
22 7
    public function update(DataUser $oldDataUser, DataUser $newDataUser)
0 ignored issues
show
Unused Code introduced by
The parameter $oldDataUser is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

22
    public function update(/** @scrutinizer ignore-unused */ DataUser $oldDataUser, DataUser $newDataUser)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Coding Style introduced by
Missing doc comment for function update()
Loading history...
23
    {
24 7
        $this->cache->forget(DataUserCache::class . '@getById:' . $newDataUser->id());
25 7
    }
26
27
}