Code Duplication    Length = 23-23 lines in 3 locations

src/Module/Command/RegisterCommand.php 1 location

@@ 18-40 (lines=23) @@
15
 *
16
 * @author Marat Shamshutdinov <[email protected]>
17
 */
18
class RegisterCommand extends ModuleCommand
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function configure()
24
    {
25
        parent::configure();
26
27
        $this->setName('module:register')
28
            ->setDescription('Install module');
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output)
35
    {
36
        $module = new Module($input->getArgument('module'));
37
        $module->register();
38
        $output->writeln(sprintf('registered <info>%s</info>', $module->getName()));
39
    }
40
}

src/Module/Command/RemoveCommand.php 1 location

@@ 18-40 (lines=23) @@
15
 *
16
 * @author Marat Shamshutdinov <[email protected]>
17
 */
18
class RemoveCommand extends ModuleCommand
19
{
20
	/**
21
	 * {@inheritdoc}
22
	 */
23
	protected function configure()
24
	{
25
		parent::configure();
26
27
		$this->setName('module:remove')
28
			->setDescription('Uninstall and remove module folder from system');
29
	}
30
31
	/**
32
	 * {@inheritdoc}
33
	 */
34
	protected function execute(InputInterface $input, OutputInterface $output)
35
	{
36
		$module = new Module($input->getArgument('module'));
37
		$module->remove();
38
		$output->writeln(sprintf('removed <info>%s</info>', $module->getName()));
39
	}
40
}

src/Module/Command/UnregisterCommand.php 1 location

@@ 18-40 (lines=23) @@
15
 *
16
 * @author Marat Shamshutdinov <[email protected]>
17
 */
18
class UnregisterCommand extends ModuleCommand
19
{
20
	/**
21
	 * {@inheritdoc}
22
	 */
23
	protected function configure()
24
	{
25
		parent::configure();
26
27
		$this->setName('module:unregister')
28
			->setDescription('Uninstall module');
29
	}
30
31
	/**
32
	 * {@inheritdoc}
33
	 */
34
	protected function execute(InputInterface $input, OutputInterface $output)
35
	{
36
		$module = new Module($input->getArgument('module'));
37
		$module->unRegister();
38
		$output->writeln(sprintf('unregistered <info>%s</info>', $module->getName()));
39
	}
40
}