ClearCache   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 14
ccs 0
cts 11
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 5 1
A execute() 0 5 1
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