| Conditions | 3 |
| Paths | 3 |
| Total Lines | 27 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function execute() |
||
| 14 | { |
||
| 15 | if (!$this->config->getBool('shouldEnableModule')) { |
||
| 16 | return false; |
||
| 17 | } |
||
| 18 | |||
| 19 | if ($this->config->getBool('isModmanMode')) { |
||
| 20 | $this->output->writeln('<error>Module cannot be activated in modman mode</error>'); |
||
| 21 | return false; |
||
| 22 | } |
||
| 23 | |||
| 24 | $application = $this->getCommand()->getApplication(); |
||
| 25 | |||
| 26 | $combinedModuleName = $this->config->getString('vendorNamespace') |
||
| 27 | . '_' |
||
| 28 | . $this->config->getString('moduleName'); |
||
| 29 | |||
| 30 | $application->setAutoExit(false); |
||
| 31 | $application->run( |
||
| 32 | new ArrayInput( |
||
| 33 | [ |
||
| 34 | 'command' => 'module:enable', |
||
| 35 | 'module' => [$combinedModuleName], |
||
| 36 | ] |
||
| 37 | ) |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.