@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('module_path')) { |
|
3 | +if (!function_exists('module_path')) { |
|
4 | 4 | function module_path($name, $path = '') |
5 | 5 | { |
6 | 6 | $module = app('modules')->find($name); |
7 | 7 | |
8 | - return $module->getPath() . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
8 | + return $module->getPath().($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
9 | 9 | } |
10 | 10 | } |
11 | 11 | |
12 | -if (! function_exists('config_path')) { |
|
12 | +if (!function_exists('config_path')) { |
|
13 | 13 | /** |
14 | 14 | * Get the configuration path. |
15 | 15 | * |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | */ |
19 | 19 | function config_path($path = '') |
20 | 20 | { |
21 | - return app()->basePath() . '/config' . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
21 | + return app()->basePath().'/config'.($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | -if (! function_exists('public_path')) { |
|
25 | +if (!function_exists('public_path')) { |
|
26 | 26 | /** |
27 | 27 | * Get the path to the public folder. |
28 | 28 | * |
@@ -31,6 +31,6 @@ discard block |
||
31 | 31 | */ |
32 | 32 | function public_path($path = '') |
33 | 33 | { |
34 | - return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path); |
|
34 | + return app()->make('path.public').($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path); |
|
35 | 35 | } |
36 | 36 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | foreach ($this->module->getOrdered($this->option('direction')) as $module) { |
52 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
52 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
53 | 53 | $this->migrateStatus($module); |
54 | 54 | } |
55 | 55 |
@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | |
78 | 78 | protected function getEventName(Module $module) |
79 | 79 | { |
80 | - $namespace = $this->laravel['modules']->config('namespace') . "\\" . $module->getStudlyName(); |
|
80 | + $namespace = $this->laravel['modules']->config('namespace')."\\".$module->getStudlyName(); |
|
81 | 81 | $eventPath = GenerateConfigReader::read('event'); |
82 | 82 | |
83 | - $eventName = $namespace . "\\" . $eventPath->getPath() . "\\" . $this->option('event'); |
|
83 | + $eventName = $namespace."\\".$eventPath->getPath()."\\".$this->option('event'); |
|
84 | 84 | |
85 | 85 | return str_replace('/', '\\', $eventName); |
86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $listenerPath = GenerateConfigReader::read('listener'); |
93 | 93 | |
94 | - return $path . $listenerPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
94 | + return $path.$listenerPath->getPath().'/'.$this->getFileName().'.php'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -76,10 +76,10 @@ |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * Get module type . |
|
80 | - * |
|
81 | - * @return string |
|
82 | - */ |
|
79 | + * Get module type . |
|
80 | + * |
|
81 | + * @return string |
|
82 | + */ |
|
83 | 83 | private function getModuleType() |
84 | 84 | { |
85 | 85 | $isPlain = $this->option('plain'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
64 | 64 | $factoryPath = GenerateConfigReader::read('component-view'); |
65 | 65 | |
66 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
66 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private function getFileName() |
73 | 73 | { |
74 | - return Str::lower($this->argument('name')) . '.blade.php'; |
|
74 | + return Str::lower($this->argument('name')).'.blade.php'; |
|
75 | 75 | } |
76 | 76 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->setupStubPath(); |
27 | 27 | $this->registerProviders(); |
28 | 28 | |
29 | - $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'modules'); |
|
29 | + $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'modules'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function setupStubPath() |
36 | 36 | { |
37 | - $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__ . '/Commands/stubs'; |
|
37 | + $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs'; |
|
38 | 38 | Stub::setBasePath($path); |
39 | 39 | |
40 | - $this->app->booted(function ($app) { |
|
40 | + $this->app->booted(function($app) { |
|
41 | 41 | /** @var RepositoryInterface $moduleRepository */ |
42 | 42 | $moduleRepository = $app[RepositoryInterface::class]; |
43 | 43 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function registerServices() |
53 | 53 | { |
54 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
54 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
55 | 55 | $path = $app['config']->get('modules.paths.modules'); |
56 | 56 | |
57 | 57 | return new Laravel\LaravelFileRepository($app, $path); |
58 | 58 | }); |
59 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
59 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
60 | 60 | $activator = $app['config']->get('modules.activator'); |
61 | - $class = $app['config']->get('modules.activators.' . $activator)['class']; |
|
61 | + $class = $app['config']->get('modules.activators.'.$activator)['class']; |
|
62 | 62 | |
63 | 63 | if ($class === null) { |
64 | 64 | throw InvalidActivatorClass::missingConfig(); |
@@ -36,8 +36,8 @@ |
||
36 | 36 | */ |
37 | 37 | protected function registerNamespaces() |
38 | 38 | { |
39 | - $configPath = __DIR__ . '/../config/config.php'; |
|
40 | - $stubsPath = dirname(__DIR__) . '/src/Commands/stubs'; |
|
39 | + $configPath = __DIR__.'/../config/config.php'; |
|
40 | + $stubsPath = dirname(__DIR__).'/src/Commands/stubs'; |
|
41 | 41 | |
42 | 42 | $this->publishes([ |
43 | 43 | $configPath => config_path('modules.php'), |
@@ -87,9 +87,9 @@ |
||
87 | 87 | { |
88 | 88 | $namespace = $this->laravel['modules']->config('namespace'); |
89 | 89 | |
90 | - $namespace .= '\\' . $module->getStudlyName(); |
|
90 | + $namespace .= '\\'.$module->getStudlyName(); |
|
91 | 91 | |
92 | - $namespace .= '\\' . $this->getDefaultNamespace(); |
|
92 | + $namespace .= '\\'.$this->getDefaultNamespace(); |
|
93 | 93 | |
94 | 94 | $namespace = str_replace('/', '\\', $namespace); |
95 | 95 |
@@ -18,9 +18,9 @@ |
||
18 | 18 | // This checks if we are running on a Laravel Vapor managed instance |
19 | 19 | // and sets the path to a writable one (services path is not on a writable storage in Vapor). |
20 | 20 | if (!is_null(env('VAPOR_MAINTENANCE_MODE', null))) { |
21 | - return Str::replaceLast('config.php', $this->getSnakeNamespace() . '_module.php', $this->app->getCachedConfigPath()); |
|
21 | + return Str::replaceLast('config.php', $this->getSnakeNamespace().'_module.php', $this->app->getCachedConfigPath()); |
|
22 | 22 | } |
23 | - return Str::replaceLast('services.php', $this->getSnakeNamespace() . '_module.php', $this->app->getCachedServicesPath()); |
|
23 | + return Str::replaceLast('services.php', $this->getSnakeNamespace().'_module.php', $this->app->getCachedServicesPath()); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |