private function printModulesWithFormat(IO $io, ModuleList $modules, $format)
    {
        /** @var Module $module */
        foreach ($modules as $module) {
            $installInfo = $module->getInstallInfo();

            $io->writeLine(strtr($format, array(
                '%name%' => $module->getName(),
                '%installer%' => $installInfo ? $installInfo->getInstallerName() : '',
                '%install_path%' => $module->getInstallPath(),
                '%state%' => self::$stateStrings[$module->getState()],
                '%env%' => $installInfo ? $installInfo->getEnvironment() : Environment::PROD,
            )));
        }
    }