Code Duplication    Length = 23-23 lines in 6 locations

src/Magestead/Command/VM/DestroyCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class DestroyCommand extends Command
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:destroy");
17
        $this->setDescription("Destroy 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>Destroying your development environment</info>');
28
        return new ProcessCommand('vagrant destroy --force', $this->_projectPath, $output);
29
    }
30
}

src/Magestead/Command/VM/HaltCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class HaltCommand extends Command
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:halt");
17
        $this->setDescription("Halt 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>Halting your development environment</info>');
28
        return new ProcessCommand('vagrant halt', $this->_projectPath, $output);
29
    }
30
}

src/Magestead/Command/VM/ResumeCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class ResumeCommand extends Command
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:resume");
17
        $this->setDescription("Resume your suspended 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>Resuming your development environment</info>');
28
        return new ProcessCommand('vagrant resume', $this->_projectPath, $output);
29
    }
30
}

src/Magestead/Command/VM/StatusCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class StatusCommand extends Command
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
}

src/Magestead/Command/VM/SuspendCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class SuspendCommand extends Command
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:suspend");
17
        $this->setDescription("Suspend 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>Suspending your development machine</info>');
28
        return new ProcessCommand('vagrant suspend', $this->_projectPath, $output);
29
    }
30
}

src/Magestead/Command/VM/UpCommand.php 1 location

@@ 8-30 (lines=23) @@
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
class UpCommand extends Command
9
{
10
    protected $_projectPath;
11
12
    protected function configure()
13
    {
14
        $this->_projectPath = getcwd();
15
16
        $this->setName("vm:up");
17
        $this->setDescription("Spin up 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>Spinning up your development machine</info>');
28
        return new ProcessCommand('vagrant up', $this->_projectPath, $output);
29
    }
30
}