Completed
Pull Request — master (#1945)
by
unknown
06:37
created
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs';
67 67
         Stub::setBasePath($path);
68 68
 
69
-        $this->app->booted(function ($app) {
69
+        $this->app->booted(function($app) {
70 70
             /** @var RepositoryInterface $moduleRepository */
71 71
             $moduleRepository = $app[RepositoryInterface::class];
72 72
             if ($moduleRepository->config('stubs.enabled') === true) {
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
      */
81 81
     protected function registerServices()
82 82
     {
83
-        $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) {
83
+        $this->app->singleton(Contracts\RepositoryInterface::class, function($app) {
84 84
             $path = $app['config']->get('modules.paths.modules');
85 85
 
86 86
             return new Laravel\LaravelFileRepository($app, $path);
87 87
         });
88
-        $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) {
88
+        $this->app->singleton(Contracts\ActivatorInterface::class, function($app) {
89 89
             $activator = $app['config']->get('modules.activator');
90 90
             $class = $app['config']->get('modules.activators.'.$activator)['class'];
91 91
 
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 
101 101
     protected function registerMigrations(): void
102 102
     {
103
-        if (! $this->app['config']->get('modules.auto-discover.migrations', true)) {
103
+        if (!$this->app['config']->get('modules.auto-discover.migrations', true)) {
104 104
             return;
105 105
         }
106 106
 
107
-        $this->app->resolving(Migrator::class, function (Migrator $migrator) {
107
+        $this->app->resolving(Migrator::class, function(Migrator $migrator) {
108 108
             $migration_path = $this->app['config']->get('modules.paths.generator.migration.path');
109 109
             collect(\Nwidart\Modules\Facades\Module::allEnabled())
110
-                ->each(function (\Nwidart\Modules\Laravel\Module $module) use ($migration_path, $migrator) {
110
+                ->each(function(\Nwidart\Modules\Laravel\Module $module) use ($migration_path, $migrator) {
111 111
                     $migrator->path($module->getExtraPath($migration_path));
112 112
                 });
113 113
         });
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
     protected function registerTranslations(): void
117 117
     {
118
-        if (! $this->app['config']->get('modules.auto-discover.translations', true)) {
118
+        if (!$this->app['config']->get('modules.auto-discover.translations', true)) {
119 119
             return;
120 120
         }
121
-        $this->callAfterResolving('translator', function (TranslatorContract $translator) {
122
-            if (! $translator instanceof Translator) {
121
+        $this->callAfterResolving('translator', function(TranslatorContract $translator) {
122
+            if (!$translator instanceof Translator) {
123 123
                 return;
124 124
             }
125 125
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             ]);
131 131
 
132 132
             collect(glob($path, GLOB_ONLYDIR))
133
-                ->each(function (string $path) use ($translator) {
133
+                ->each(function(string $path) use ($translator) {
134 134
                     preg_match('/\/([^\/]+)\/lang/', $path, $matches);
135 135
                     $translator->addNamespace(strtolower($matches[1]), $path);
136 136
                     $translator->addJsonPath($path);
Please login to merge, or discard this patch.