Completed
Push — feature/add-cli-installers ( 115549...a5e20d )
by Steven
13:21
created

StatusCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php namespace Magestead\Command\VM;
2
3
use Magestead\Command\ProcessCommand;
4
use Symfony\Component\Console\Command\Command;
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8 View Code Duplication
class StatusCommand extends Command
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:status");
17
        $this->setDescription("Get the status of your development machine");
18
    }
19
20
    /**
21
     * @param InputInterface $input
22
     * @param OutputInterface $output
23
     * @return ProcessCommand
24
     */
25
    protected function execute(InputInterface $input, OutputInterface $output)
26
    {
27
        $output->writeln('<info>Getting machine status</info>');
28
        return new ProcessCommand('vagrant status', $this->_projectPath, $output);
29
    }
30
}