public static function getModuleNamesWithoutRoot(Args $args, ModuleList $modules)
    {
        // Display all modules if "all" is set
        if ($args->isOptionSet('all')) {
            return $modules->getInstalledModuleNames();
        }

        $moduleNames = array();

        foreach ($args->getOption('module') as $moduleName) {
            $moduleNames[] = $moduleName;
        }

        return $moduleNames ?: $modules->getInstalledModuleNames();
    }