@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | { |
178 | 178 | $lowerName = $this->getLowerName(); |
179 | 179 | |
180 | - $langPath = $this->getPath() . "/Resources/lang"; |
|
180 | + $langPath = $this->getPath()."/Resources/lang"; |
|
181 | 181 | |
182 | 182 | if (is_dir($langPath)) { |
183 | 183 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | $file = 'module.json'; |
198 | 198 | } |
199 | 199 | |
200 | - return array_get($this->moduleJson, $file, function () use ($file) { |
|
201 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
200 | + return array_get($this->moduleJson, $file, function() use ($file) { |
|
201 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']); |
|
202 | 202 | }); |
203 | 203 | } |
204 | 204 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | */ |
250 | 250 | protected function fireEvent($event) |
251 | 251 | { |
252 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
252 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | protected function registerFiles() |
280 | 280 | { |
281 | 281 | foreach ($this->get('files', []) as $file) { |
282 | - include $this->path . '/' . $file; |
|
282 | + include $this->path.'/'.$file; |
|
283 | 283 | } |
284 | 284 | } |
285 | 285 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | */ |
401 | 401 | public function getExtraPath($path) |
402 | 402 | { |
403 | - return $this->getPath() . '/' . $path; |
|
403 | + return $this->getPath().'/'.$path; |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | /** |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $modules = []; |
40 | 40 | |
41 | 41 | foreach ($cached as $name => $module) { |
42 | - $path = $this->config('paths.modules') . '/' . $name; |
|
42 | + $path = $this->config('paths.modules').'/'.$name; |
|
43 | 43 | |
44 | 44 | $modules[$name] = new Module($this->app, $name, $path); |
45 | 45 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function getCachedServicesPath() |
16 | 16 | { |
17 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
17 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $modules = []; |
40 | 40 | |
41 | 41 | foreach ($cached as $name => $module) { |
42 | - $path = $this->config('paths.modules') . '/' . $name; |
|
42 | + $path = $this->config('paths.modules').'/'.$name; |
|
43 | 43 | |
44 | 44 | $modules[$name] = new Module($this->app, $name, $path); |
45 | 45 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function getCachedServicesPath() |
14 | 14 | { |
15 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php'); |
|
15 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->basePath('storage/app/').'services.php'); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $paths = $this->paths; |
101 | 101 | |
102 | - $paths[] = $this->getPath() . '/*'; |
|
102 | + $paths[] = $this->getPath().'/*'; |
|
103 | 103 | |
104 | 104 | if ($this->config('scan.enabled')) { |
105 | 105 | $paths = array_merge($paths, $this->config('scan.paths')); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function getCached() |
147 | 147 | { |
148 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
148 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
149 | 149 | return $this->toCollection()->toArray(); |
150 | 150 | }); |
151 | 151 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | { |
234 | 234 | $modules = $this->enabled(); |
235 | 235 | |
236 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
236 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
237 | 237 | if ($a->order == $b->order) { |
238 | 238 | return 0; |
239 | 239 | } |
@@ -382,9 +382,9 @@ discard block |
||
382 | 382 | public function getModulePath($module) |
383 | 383 | { |
384 | 384 | try { |
385 | - return $this->findOrFail($module)->getPath() . '/'; |
|
385 | + return $this->findOrFail($module)->getPath().'/'; |
|
386 | 386 | } catch (ModuleNotFoundException $e) { |
387 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
387 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
388 | 388 | } |
389 | 389 | } |
390 | 390 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | */ |
398 | 398 | public function assetPath($module) |
399 | 399 | { |
400 | - return $this->config('paths.assets') . '/' . $module; |
|
400 | + return $this->config('paths.assets').'/'.$module; |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | /** |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | */ |
411 | 411 | public function config($key, $default = null) |
412 | 412 | { |
413 | - return $this->app['config']->get('modules.' . $key, $default); |
|
413 | + return $this->app['config']->get('modules.'.$key, $default); |
|
414 | 414 | } |
415 | 415 | |
416 | 416 | /** |
@@ -501,9 +501,9 @@ discard block |
||
501 | 501 | } |
502 | 502 | list($name, $url) = explode(':', $asset); |
503 | 503 | |
504 | - $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
504 | + $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
505 | 505 | |
506 | - $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url); |
|
506 | + $url = $this->app['url']->asset($baseUrl."/{$name}/".$url); |
|
507 | 507 | |
508 | 508 | return str_replace(['http://', 'https://'], '//', $url); |
509 | 509 | } |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function setupStubPath() |
32 | 32 | { |
33 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
33 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
34 | 34 | |
35 | - $this->app->booted(function ($app) { |
|
35 | + $this->app->booted(function($app) { |
|
36 | 36 | if ($app['modules']->config('stubs.enabled') === true) { |
37 | 37 | Stub::setBasePath($app['modules']->config('stubs.path')); |
38 | 38 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function registerServices() |
46 | 46 | { |
47 | - $this->app->singleton('modules', function ($app) { |
|
47 | + $this->app->singleton('modules', function($app) { |
|
48 | 48 | $path = $app['config']->get('modules.paths.modules'); |
49 | 49 | |
50 | 50 | return new \Nwidart\Modules\Laravel\Repository($app, $path); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function setupStubPath() |
32 | 32 | { |
33 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
33 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
34 | 34 | |
35 | 35 | if (app('modules')->config('stubs.enabled') === true) { |
36 | 36 | Stub::setBasePath(app('modules')->config('stubs.path')); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | protected function registerServices() |
44 | 44 | { |
45 | - $this->app->singleton('modules', function ($app) { |
|
45 | + $this->app->singleton('modules', function($app) { |
|
46 | 46 | $path = $app['config']->get('modules.paths.modules'); |
47 | 47 | |
48 | 48 | return new \Nwidart\Modules\Lumen\Repository($app, $path); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | protected function registerNamespaces() |
45 | 45 | { |
46 | - $configPath = __DIR__ . '/../config/config.php'; |
|
46 | + $configPath = __DIR__.'/../config/config.php'; |
|
47 | 47 | |
48 | 48 | $this->mergeConfigFrom($configPath, 'modules'); |
49 | 49 | $this->publishes([ |