Passed
Push — master ( 98a792...5ddf32 )
by Mike
55s
created

CleanCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 5 1
A execute() 0 3 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 void
32
     * @throws \InvalidArgumentException
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output): void
35
    {
36
        $this->getFacade()->cleanDataProvider();
37
    }
38
39
}
40