Passed
Push — master ( 52d6d0...ade603 )
by Andreas
33:03
created

cacheinvalidate::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * @package midcom.console
4
 * @author CONTENT CONTROL http://www.contentcontrol-berlin.de/
5
 * @copyright CONTENT CONTROL http://www.contentcontrol-berlin.de/
6
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
7
 */
8
9
namespace midcom\console\command;
10
11
use Symfony\Component\Console\Command\Command;
12
use Symfony\Component\Console\Input\InputInterface;
13
use Symfony\Component\Console\Output\OutputInterface;
14
use midcom;
15
16
/**
17
 * clear the cache of the current site
18
 *
19
 * @see midcom_services_cache
20
 * @package midcom.console
21
 */
22
class cacheinvalidate extends Command
23
{
24 1
    protected function configure()
25
    {
26 1
        $this->setName('midcom:cache-invalidate')
27 1
            ->setAliases(['cache-invalidate'])
28 1
            ->setDescription('Clears the cache');
29 1
    }
30
31
    protected function execute(InputInterface $input, OutputInterface $output) : int
32
    {
33
        midcom::get()->cache->invalidate_all();
34
        return 0;
35
    }
36
}
37