Code Duplication    Length = 11-11 lines in 2 locations

src/Module/Command/UpdateCommand.php 1 location

@@ 43-53 (lines=11) @@
40
	{
41
		$module = new Module($input->getArgument('module'));
42
		$modulesUpdated = null;
43
		while ($module->update($modulesUpdated))
44
		{
45
			if (is_array($modulesUpdated))
46
			{
47
				foreach ($modulesUpdated as $moduleName => $moduleVersion)
48
				{
49
					$output->writeln(sprintf('updated %s to <info>%s</info>', $moduleName, $moduleVersion));
50
				}
51
			}
52
			return $this->restartScript($input, $output);
53
		}
54
		return 0;
55
	}
56
}

src/Module/Command/LoadCommand.php 1 location

@@ 58-68 (lines=11) @@
55
56
        if (!$input->getOption('no-update')) {
57
            $modulesUpdated = null;
58
            while ($module->update($modulesUpdated)) {
59
                if (is_array($modulesUpdated)) {
60
                    foreach ($modulesUpdated as $moduleName => $moduleVersion) {
61
                        $output->writeln(sprintf('updated %s to <info>%s</info>', $moduleName, $moduleVersion));
62
                    }
63
                }
64
                return $this->restartScript($input, $output);
65
            }
66
        }
67
68
        if (!$input->getOption('no-register')) {
69
            try {
70
                $module->register();
71
            } catch (ModuleInstallException $e) {