@@ -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'); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * Get a specific data from json file by given the key. |
91 | 91 | * |
92 | 92 | * @param string $key |
93 | - * @param null $default |
|
93 | + * @param string $default |
|
94 | 94 | * |
95 | 95 | * @return mixed |
96 | 96 | */ |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
191 | - * @return mixed|null |
|
191 | + * @return string |
|
192 | 192 | */ |
193 | 193 | public function getVersion() |
194 | 194 | { |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | { |
109 | 109 | $module = $this->find($name); |
110 | 110 | if ($module) { |
111 | - return $module->getPath() . '/'; |
|
111 | + return $module->getPath().'/'; |
|
112 | 112 | } |
113 | 113 | |
114 | - return $this->getPath() . '/' . Str::studly($name) . '/'; |
|
114 | + return $this->getPath().'/'.Str::studly($name).'/'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function getCached() |
163 | 163 | { |
164 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
164 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
165 | 165 | return $this->getModel()->all(); |
166 | 166 | }); |
167 | 167 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | /** @var DatabaseModule $module */ |
273 | 273 | $module = $this->findOrFail($name); |
274 | 274 | |
275 | - $json = Json::make($module->getPath() . '/' . 'module.json'); |
|
275 | + $json = Json::make($module->getPath().'/'.'module.json'); |
|
276 | 276 | $data = $json->getAttributes(); |
277 | 277 | |
278 | 278 | if (!isset($data['version'])) { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | $allows = $this->getModel()->getFillable(); |
304 | 304 | } |
305 | 305 | |
306 | - return array_filter($attributes, function ($k) use ($allows) { |
|
306 | + return array_filter($attributes, function($k) use ($allows) { |
|
307 | 307 | return in_array($k, $allows); |
308 | 308 | }, ARRAY_FILTER_USE_KEY); |
309 | 309 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | /** |
72 | 72 | * Get module path for a specific module. |
73 | 73 | * |
74 | - * @param $name |
|
74 | + * @param string $name |
|
75 | 75 | * |
76 | 76 | * @return string |
77 | 77 | */ |
@@ -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); |