@@ -56,8 +56,12 @@ public function __construct(
56
56
*/
57
57
protected function configure ()
58
58
{
59
- $ this ->setName ('module:config:status ' )
60
- ->setDescription ('Checks the modules configuration in the \'app/etc/config.php \' file and reports if they are up to date or not ' );
59
+ $ this
60
+ ->setName ('module:config:status ' )
61
+ ->setDescription (
62
+ 'Checks the modules configuration in the \'app/etc/config.php \' file '
63
+ . 'and reports if they are up to date or not '
64
+ );
61
65
62
66
parent ::configure ();
63
67
}
@@ -71,6 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
71
75
// the config as currently in app/etc/config.php
72
76
$ currentConfig = $ this ->configReader ->load (ConfigFilePool::APP_CONFIG );
73
77
if (!array_key_exists (ConfigOptionsListConstants::KEY_MODULES , $ currentConfig )) {
78
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
74
79
throw new \Exception ('Can \'t find the modules configuration in the \'app/etc/config.php \' file. ' );
75
80
}
76
81
@@ -82,14 +87,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
82
87
$ correctModuleConfig = $ installer ->getModulesConfig ();
83
88
84
89
if ($ currentModuleConfig !== $ correctModuleConfig ) {
90
+ // phpcs:ignore Magento2.Exceptions.DirectThrow
85
91
throw new \Exception (
86
- 'The modules configuration in the \'app/etc/config.php \' file is outdated. Run \'setup:upgrade \' to fix it. '
92
+ 'The modules configuration in the \'app/etc/config.php \' file is outdated. '
93
+ . 'Run \'setup:upgrade \' to fix it. '
87
94
);
88
95
}
89
96
90
97
$ output ->writeln (
91
98
'<info>The modules configuration is up to date.</info> '
92
99
);
100
+ // phpcs:disable Magento2.Exceptions.ThrowCatch
93
101
} catch (\Exception $ e ) {
94
102
$ output ->writeln ('<error> ' . $ e ->getMessage () . '</error> ' );
95
103
0 commit comments