Completed
Push — develop ( c6a956...40134e )
by Steven
9s
created

SuspendCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
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
/**
9
 * Class SuspendCommand
10
 * @package Magestead\Command\VM
11
 */
12 View Code Duplication
class SuspendCommand 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...
13
{
14
    protected $_projectPath;
15
16
    protected function configure()
17
    {
18
        $this->_projectPath = getcwd();
19
20
        $this->setName("vm:suspend");
21
        $this->setDescription("Suspend your development machine");
22
    }
23
24
    /**
25
     * @param InputInterface $input
26
     * @param OutputInterface $output
27
     * @return ProcessCommand
28
     */
29
    protected function execute(InputInterface $input, OutputInterface $output)
30
    {
31
        $output->writeln('<info>Suspending your development machine</info>');
32
        return new ProcessCommand('vagrant suspend', $this->_projectPath, $output);
33
    }
34
}
35