bristol-su /
control
| 1 | <?php |
||||
| 2 | |||||
|
0 ignored issues
–
show
Coding Style
introduced
by
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
|
|||||
| 10 | { |
||||
| 11 | |||||
| 12 | /** |
||||
|
0 ignored issues
–
show
|
|||||
| 13 | * @var Repository |
||||
| 14 | */ |
||||
| 15 | private $cache; |
||||
|
0 ignored issues
–
show
|
|||||
| 16 | |||||
| 17 | 9 | public function __construct(Repository $cache) |
|||
|
0 ignored issues
–
show
|
|||||
| 18 | { |
||||
| 19 | 9 | $this->cache = $cache; |
|||
| 20 | 9 | } |
|||
| 21 | |||||
| 22 | 7 | public function update(DataUser $oldDataUser, DataUser $newDataUser) |
|||
|
0 ignored issues
–
show
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
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...
|
|||||
| 23 | { |
||||
| 24 | 7 | $this->cache->forget(DataUserCache::class . '@getById:' . $newDataUser->id()); |
|||
| 25 | 7 | } |
|||
| 26 | |||||
| 27 | } |