diff --git a/src/LinusShops/Prophet/Commands/Run.php b/src/LinusShops/Prophet/Commands/Run.php index 4062c6f..396942a 100644 --- a/src/LinusShops/Prophet/Commands/Run.php +++ b/src/LinusShops/Prophet/Commands/Run.php @@ -66,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } /** @var Module $module */ - foreach ($config->getModuleList() as $module) { + foreach ($config->getModules() as $module) { if ($this->checkIfRequested($modulesRequested, $module, $output)) { $modulePath = $module->getPath(); $magentoPath = $input->getOption('path'); @@ -82,7 +82,8 @@ protected function execute(InputInterface $input, OutputInterface $output) private function loadClasses($modulesRequested, Config $config, InputInterface $input, OutputInterface $output) { $loaded = true; - if ($config->hasModules()) { + + if (!$config->hasModules()) { $output->writeln('No modules found in prophet.json.'); $loaded = false; } else { diff --git a/src/LinusShops/Prophet/Config.php b/src/LinusShops/Prophet/Config.php index 2f079a3..2ec194a 100644 --- a/src/LinusShops/Prophet/Config.php +++ b/src/LinusShops/Prophet/Config.php @@ -60,4 +60,9 @@ public function getModules() { return $this->modules; } + + public function hasModules() + { + return count($this->modules) > 0; + } }