Passed
Push — master ( 3646da...aa9f24 )
by Andrea
16:20
created

CacheClearer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A clear() 0 7 2
1
<?php
2
3
namespace Cdf\BiCoreBundle\Cache;
4
5
use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface;
6
use Symfony\Component\Cache\Simple\FilesystemCache;
7
8
class CacheClearer implements CacheClearerInterface
9
{
10 1
    public function clear($cacheDirectory)
11
    {
12
        //Qui si possono mettere operazioni da fare in caso di clear cache
13 1
        $cache = new FilesystemCache();
14 1
        if ($cache->has('git_tag')) {
15 1
            $cache->delete('git_tag');
16 1
            $cache->clear();
17
        }
18 1
    }
19
}
20