CleanCommand::configure()   A
last analyzed

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 0
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
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