Skip to content

Commit a92dba6

Browse files
Safwan KhanOlga Kopylova
authored andcommitted
MAGETWO-33205: Help command in Setup CLI for list of modules
- Changes based on code review feedback.
1 parent 31f505d commit a92dba6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

setup/src/Magento/Setup/Controller/ConsoleController.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ class ConsoleController extends AbstractActionController
4444
const CMD_MODULE_DISABLE = 'module-disable';
4545
/**#@- */
4646

47-
/**#@+
47+
/**
4848
* Help option for retrieving list of modules
4949
*/
5050
const HELP_LIST_OF_MODULES = 'module-list';
51-
/**#@- */
5251

5352
/**
5453
* Map of controller actions exposed in CLI
@@ -547,7 +546,7 @@ public function helpAction()
547546
case UserConfig::KEY_TIMEZONE:
548547
return $this->arrayToString($this->options->getTimezoneList());
549548
case self::HELP_LIST_OF_MODULES:
550-
return $this->getModuleList();
549+
return $this->getModuleListMsg();
551550
default:
552551
if (isset($usages[$type])) {
553552
if ($usages[$type]) {
@@ -633,7 +632,7 @@ private function arrayToString($input)
633632
*
634633
* @return string
635634
*/
636-
private function getModuleList()
635+
private function getModuleListMsg()
637636
{
638637
$moduleList = $this->getObjectManager()->create('Magento\Framework\Module\ModuleList');
639638
$result = "\nList of enabled modules:\n";
@@ -648,7 +647,7 @@ private function getModuleList()
648647
$fullModuleList = $this->getObjectManager()->create('Magento\Framework\Module\FullModuleList');
649648
$result .= "\nList of disabled modules:\n";
650649
$disabledModuleList = array_diff($fullModuleList->getNames(), $enabledModuleList);
651-
foreach ($disabledModuleList as $moduleName) {
650+
foreach ($disabledModuleList as $moduleName) {
652651
$result .= "$moduleName\n";
653652
}
654653
if (count($disabledModuleList) === 0) {

0 commit comments

Comments
 (0)