Completed
Push — master ( da1779...3215e6 )
by Nicolas
04:06
created

CanClearModulesCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 12
ccs 3
cts 4
cp 0.75
rs 10

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 21
    public function clearCache()
11
    {
12 21
        if (config('modules.cache.enabled') === true) {
13
            app('cache')->forget('laravel-modules');
14
        }
15 21
    }
16
}
17