CleanCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 2
1
<?php
2
namespace Peridot\WebDriverManager\Console;
3
4
use Symfony\Component\Console\Input\InputInterface;
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
/**
8
 * CleanCommand is used to remove everything from the manager install path.
9
 *
10
 * @package Peridot\WebDriverManager\Console
11
 */
12
class CleanCommand extends AbstractManagerCommand
13
{
14
    protected function configure()
15
    {
16
        $this
17
            ->setName('clean')
18
            ->setDescription('Delete contents of installation directory');
19
    }
20
21
    /**
22
     * @param InputInterface $input
23
     * @param OutputInterface $output
24
     * @return int|null|void
25
     */
26
    protected function execute(InputInterface $input, OutputInterface $output)
27
    {
28
        $output->writeln('<info>Deleting installed binaries...</info>');
29
        $this->manager->clean();
30
        $output->writeln('<info>Installation directory cleaned</info>');
31
        return 0;
32
    }
33
} 
34