Completed
Push — master ( 247ae6...f93a8c )
by Nicolas
03:59
created

CanClearModulesCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A clearCache() 0 6 2
1
<?php
2
3
namespace Nwidart\Modules\Traits;
4
5
trait CanClearModulesCache
6
{
7
    /**
8
     * Clear the modules cache if it is enabled
9
     */
10 49
    public function clearCache()
11
    {
12 49
        if (config('modules.cache.enabled') === true) {
13
            app('cache')->forget(config('modules.cache.key'));
14
        }
15 49
    }
16
}
17