| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class PublishConfigurationCommand extends Command |
||
| 9 | { |
||
| 10 | /** @var string */ |
||
| 11 | protected $signature = 'module:publish-config |
||
| 12 | {module? : The module to publish the config files for} |
||
| 13 | {--f|force : Force the publishing of config files}'; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | protected $description = 'Publish the config files for a module.'; |
||
| 17 | |||
| 18 | public function handle(): void |
||
| 19 | { |
||
| 20 | if ($module = $this->argument('module')) { |
||
| 21 | $this->publishConfiguration($module); |
||
|
|
|||
| 22 | |||
| 23 | return; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** @var \Rawilk\LaravelModules\Module $module */ |
||
| 27 | foreach ($this->laravel['modules']->allEnabled() as $module) { |
||
| 28 | $this->publishConfiguration($module->getName()); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | private function getServiceProviderForModule(string $name): string |
||
| 38 | } |
||
| 39 | |||
| 40 | private function publishConfiguration(string $module): void |
||
| 49 |