CleanCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 10
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
2
declare(strict_types=1);
3
4
5
namespace Xervice\DataProvider\Communication\Console;
6
7
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Xervice\Console\Business\Model\Command\AbstractCommand;
11
12
/**
13
 * @method \Xervice\DataProvider\Business\DataProviderFacade getFacade()
14
 */
15
class CleanCommand extends AbstractCommand
16
{
17
    /**
18
     * @throws \Symfony\Component\Console\Exception\InvalidArgumentException
19
     */
20
    protected function configure(): void
21
    {
22
        $this
23
            ->setName('dataprovider:clean')
24
            ->setDescription('Remove all data provider classes');
25
    }
26
27
    /**
28
     * @param \Symfony\Component\Console\Input\InputInterface $input
29
     * @param \Symfony\Component\Console\Output\OutputInterface $output
30
     *
31
     * @return int
32
     * @throws \InvalidArgumentException
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output)
35
    {
36
        $this->getFacade()->cleanDataProvider();
37
        
38
        return 0;
39
    }
40
41
}
42