@@ -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 | /** |
@@ -18,10 +18,10 @@ |
||
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->getSnakeName() . '_module.php', $this->app->getCachedConfigPath()); |
|
21 | + return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath()); |
|
22 | 22 | } |
23 | 23 | |
24 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
24 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -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'), |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | $lowerName = $this->getLowerName(); |
205 | 205 | |
206 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
206 | + $langPath = $this->getPath().'/Resources/lang'; |
|
207 | 207 | |
208 | 208 | if (is_dir($langPath)) { |
209 | 209 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | $file = 'module.json'; |
224 | 224 | } |
225 | 225 | |
226 | - return Arr::get($this->moduleJson, $file, function () use ($file) { |
|
227 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->files); |
|
226 | + return Arr::get($this->moduleJson, $file, function() use ($file) { |
|
227 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->files); |
|
228 | 228 | }); |
229 | 229 | } |
230 | 230 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | protected function fireEvent($event): void |
279 | 279 | { |
280 | - $this->app['events']->dispatch(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
280 | + $this->app['events']->dispatch(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
281 | 281 | } |
282 | 282 | /** |
283 | 283 | * Register the aliases from this module. |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | protected function registerFiles(): void |
303 | 303 | { |
304 | 304 | foreach ($this->get('files', []) as $file) { |
305 | - include $this->path . '/' . $file; |
|
305 | + include $this->path.'/'.$file; |
|
306 | 306 | } |
307 | 307 | } |
308 | 308 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function getExtraPath(string $path): string |
409 | 409 | { |
410 | - return $this->getPath() . '/' . $path; |
|
410 | + return $this->getPath().'/'.$path; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | protected function writeComponentViewTemplate() |
51 | 51 | { |
52 | - $this->call('module:make-component-view', ['name' => $this->argument('name') , 'module' => $this->argument('module')]); |
|
52 | + $this->call('module:make-component-view', ['name' => $this->argument('name'), 'module' => $this->argument('module')]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function getDefaultNamespace(): string |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'NAMESPACE' => $this->getClassNamespace($module), |
83 | 83 | 'CLASS' => $this->getClass(), |
84 | 84 | 'LOWER_NAME' => $module->getLowerName(), |
85 | - 'COMPONENT_NAME' => 'components.' . Str::lower($this->argument('name')), |
|
85 | + 'COMPONENT_NAME' => 'components.'.Str::lower($this->argument('name')), |
|
86 | 86 | ]))->render(); |
87 | 87 | } |
88 | 88 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
95 | 95 | $factoryPath = GenerateConfigReader::read('component-class'); |
96 | 96 | |
97 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
97 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -102,6 +102,6 @@ discard block |
||
102 | 102 | */ |
103 | 103 | private function getFileName() |
104 | 104 | { |
105 | - return Str::studly($this->argument('name')) . '.php'; |
|
105 | + return Str::studly($this->argument('name')).'.php'; |
|
106 | 106 | } |
107 | 107 | } |
@@ -59,9 +59,9 @@ |
||
59 | 59 | |
60 | 60 | $rootNamespace = config('modules.namespace'); |
61 | 61 | |
62 | - $modelPath = glob($rootNamespace . DIRECTORY_SEPARATOR . |
|
63 | - '*' . DIRECTORY_SEPARATOR . |
|
64 | - config('modules.paths.generator.model.path') . DIRECTORY_SEPARATOR . |
|
62 | + $modelPath = glob($rootNamespace.DIRECTORY_SEPARATOR. |
|
63 | + '*'.DIRECTORY_SEPARATOR. |
|
64 | + config('modules.paths.generator.model.path').DIRECTORY_SEPARATOR. |
|
65 | 65 | "$model.php"); |
66 | 66 | |
67 | 67 | if (!count($modelPath)) { |