Passed
Push — master ( 6a7dae...ba8658 )
by Stéphane
03:03
created

ClearCache::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Todaymade\Daux\Console;
2
3
use Symfony\Component\Console\Command\Command as SymfonyCommand;
4
use Symfony\Component\Console\Input\InputInterface;
5
use Symfony\Component\Console\Output\OutputInterface;
6
use Todaymade\Daux\Cache;
7
8
class ClearCache extends SymfonyCommand
9
{
10
    protected function configure()
11
    {
12
        $this
13
            ->setName('clear-cache')
14
            ->setDescription('Clears the cache');
15
    }
16
17
    protected function execute(InputInterface $input, OutputInterface $output)
18
    {
19
        $output->writeln("Clearing cache at '" . Cache::getDirectory() ."'");
20
        Cache::clear();
21
        $output->writeln("<info>Cache cleared</info>");
22
    }
23
}
24