@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function config($key) |
| 89 | 89 | { |
| 90 | - return collect($this->getManifest())->flatMap(function ($configuration) use ($key) { |
|
| 90 | + return collect($this->getManifest())->flatMap(function($configuration) use ($key) { |
|
| 91 | 91 | return (array) ($configuration[$key] ?? []); |
| 92 | 92 | })->filter()->all(); |
| 93 | 93 | } |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | protected function getManifest() |
| 101 | 101 | { |
| 102 | - if (! is_null($this->manifest)) { |
|
| 102 | + if (!is_null($this->manifest)) { |
|
| 103 | 103 | return $this->manifest; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if (! is_file($this->manifestPath)) { |
|
| 106 | + if (!is_file($this->manifestPath)) { |
|
| 107 | 107 | $this->build(); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -119,12 +119,12 @@ discard block |
||
| 119 | 119 | public function build() |
| 120 | 120 | { |
| 121 | 121 | $providers = $this->paths |
| 122 | - ->flatMap(function ($path) { |
|
| 122 | + ->flatMap(function($path) { |
|
| 123 | 123 | $manifests = $this->files->glob("{$path}/module.json"); |
| 124 | 124 | is_array($manifests) || $manifests = []; |
| 125 | 125 | |
| 126 | 126 | return collect($manifests) |
| 127 | - ->map(function ($manifest) { |
|
| 127 | + ->map(function($manifest) { |
|
| 128 | 128 | return $this->files->json($manifest); |
| 129 | 129 | }); |
| 130 | 130 | }) |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | protected function write(array $manifest) |
| 154 | 154 | { |
| 155 | - if (! is_writable($dirname = dirname($this->manifestPath))) { |
|
| 155 | + if (!is_writable($dirname = dirname($this->manifestPath))) { |
|
| 156 | 156 | throw new Exception("The {$dirname} directory must be present and writable."); |
| 157 | 157 | } |
| 158 | 158 | $this->files->replace( |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs'; |
| 63 | 63 | Stub::setBasePath($path); |
| 64 | 64 | |
| 65 | - $this->app->booted(function ($app) { |
|
| 65 | + $this->app->booted(function($app) { |
|
| 66 | 66 | /** @var RepositoryInterface $moduleRepository */ |
| 67 | 67 | $moduleRepository = $app[RepositoryInterface::class]; |
| 68 | 68 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -76,12 +76,12 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | protected function registerServices() |
| 78 | 78 | { |
| 79 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
| 79 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
| 80 | 80 | $path = $app['config']->get('modules.paths.modules'); |
| 81 | 81 | |
| 82 | 82 | return new Laravel\LaravelFileRepository($app, $path); |
| 83 | 83 | }); |
| 84 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
| 84 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
| 85 | 85 | $activator = $app['config']->get('modules.activator'); |
| 86 | 86 | $class = $app['config']->get('modules.activators.'.$activator)['class']; |
| 87 | 87 | |
@@ -96,11 +96,11 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | protected function registerMigrations(): void |
| 98 | 98 | { |
| 99 | - if (! $this->app['config']->get('modules.auto-discover.migrations', true)) { |
|
| 99 | + if (!$this->app['config']->get('modules.auto-discover.migrations', true)) { |
|
| 100 | 100 | return; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $this->app->resolving(Migrator::class, function (Migrator $migrator) { |
|
| 103 | + $this->app->resolving(Migrator::class, function(Migrator $migrator) { |
|
| 104 | 104 | $path = implode(DIRECTORY_SEPARATOR, [ |
| 105 | 105 | $this->app['config']->get('modules.paths.modules'), |
| 106 | 106 | '*', |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | ]); |
| 110 | 110 | |
| 111 | 111 | collect(glob($path, GLOB_ONLYDIR)) |
| 112 | - ->each(function (string $path) use ($migrator) { |
|
| 112 | + ->each(function(string $path) use ($migrator) { |
|
| 113 | 113 | $migrator->path($path); |
| 114 | 114 | }); |
| 115 | 115 | }); |