@@ -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 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->registerMigrations(); |
19 | 19 | |
20 | 20 | $this->publishes([ |
21 | - __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
21 | + __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
22 | 22 | ], 'module-migrations'); |
23 | 23 | } |
24 | 24 | } |
@@ -33,6 +33,6 @@ discard block |
||
33 | 33 | |
34 | 34 | private function registerMigrations() |
35 | 35 | { |
36 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
36 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
37 | 37 | } |
38 | 38 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('modules', function (Blueprint $table) { |
|
16 | + Schema::create('modules', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('path'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function generate(): int |
30 | 30 | { |
31 | - return DB::transaction(function () { |
|
31 | + return DB::transaction(function() { |
|
32 | 32 | $name = $this->getName(); |
33 | 33 | |
34 | 34 | if ($this->module->has($name)) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function generateFiles() |
83 | 83 | { |
84 | 84 | foreach ($this->getFiles() as $stub => $file) { |
85 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
85 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
86 | 86 | |
87 | 87 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
88 | 88 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | if (GenerateConfigReader::read('provider')->generate() === true) { |
115 | 115 | Artisan::call('module:make-provider', [ |
116 | - 'name' => $moduleName . 'ServiceProvider', |
|
116 | + 'name' => $moduleName.'ServiceProvider', |
|
117 | 117 | 'module' => $moduleName, |
118 | 118 | '--master' => true, |
119 | 119 | ]); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if (GenerateConfigReader::read('controller')->generate() === true) { |
126 | 126 | $options = $this->type == 'api' ? ['--api' => true] : []; |
127 | 127 | Artisan::call('module:make-controller', [ |
128 | - 'controller' => $moduleName . 'Controller', |
|
128 | + 'controller' => $moduleName.'Controller', |
|
129 | 129 | 'module' => $moduleName, |
130 | 130 | ] + $options); |
131 | 131 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | private function generateModuleJsonFile() |
138 | 138 | { |
139 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
139 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
140 | 140 | |
141 | 141 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
142 | 142 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -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'), |
@@ -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 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | $generatorPath = GenerateConfigReader::read('provider'); |
89 | 89 | |
90 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
90 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | protected function getWebRoutesPath() |
97 | 97 | { |
98 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
98 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function getApiRoutesPath() |
105 | 105 | { |
106 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
106 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | public function getDefaultNamespace(): string |