ClearSettingsCache   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 17
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 4 1
1
<?php namespace Modules\Setting\Events\Handlers;
2
3
use Illuminate\Contracts\Cache\Repository;
4
5
class ClearSettingsCache
6
{
7
    /**
8
     * @var Repository
9
     */
10
    private $cache;
11
12
    public function __construct(Repository $cache)
13
    {
14
        $this->cache = $cache;
15
    }
16
17
    public function handle()
18
    {
19
        $this->cache->tags('setting.settings')->flush();
0 ignored issues
show
Bug introduced by
The method tags() does not seem to exist on object<Illuminate\Contracts\Cache\Repository>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
    }
21
}
22