@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | $seederPath = $this->laravel['modules']->config('paths.generator.seeder'); |
83 | 83 | |
84 | - return $path . $seederPath . '/' . $this->getSeederName() . '.php'; |
|
84 | + return $path.$seederPath.'/'.$this->getSeederName().'.php'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -93,6 +93,6 @@ discard block |
||
93 | 93 | { |
94 | 94 | $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder'; |
95 | 95 | |
96 | - return Str::studly($this->argument('name')) . $end; |
|
96 | + return Str::studly($this->argument('name')).$end; |
|
97 | 97 | } |
98 | 98 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return mixed |
|
62 | + * @return string |
|
63 | 63 | */ |
64 | 64 | protected function getTemplateContents() |
65 | 65 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | |
73 | 73 | $seederPath = $this->laravel['modules']->config('paths.generator.filter'); |
74 | 74 | |
75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return mixed |
|
62 | + * @return string |
|
63 | 63 | */ |
64 | 64 | protected function getTemplateContents() |
65 | 65 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -11,9 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | protected function loadMigrationFiles($module) |
13 | 13 | { |
14 | - $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath(); |
|
14 | + $path = $this->laravel['modules']->getModulePath($module).$this->getMigrationGeneratorPath(); |
|
15 | 15 | |
16 | - $files = $this->laravel['files']->glob($path . '/*_*.php'); |
|
16 | + $files = $this->laravel['files']->glob($path.'/*_*.php'); |
|
17 | 17 | |
18 | 18 | foreach ($files as $file) { |
19 | 19 | $this->laravel['files']->requireOnce($file); |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setupStubPath() |
57 | 57 | { |
58 | - $this->app->booted(function ($app) { |
|
59 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
58 | + $this->app->booted(function($app) { |
|
59 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
60 | 60 | |
61 | 61 | if ($app['modules']->config('stubs.enabled') === true) { |
62 | 62 | Stub::setBasePath($app['modules']->config('stubs.path')); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function registerNamespaces() |
71 | 71 | { |
72 | - $configPath = __DIR__ . '/../config/config.php'; |
|
72 | + $configPath = __DIR__.'/../config/config.php'; |
|
73 | 73 | $this->mergeConfigFrom($configPath, 'modules'); |
74 | 74 | $this->publishes([ |
75 | 75 | $configPath => config_path('modules.php'), |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | protected function registerServices() |
99 | 99 | { |
100 | - $this->app->singleton('modules', function ($app) { |
|
100 | + $this->app->singleton('modules', function($app) { |
|
101 | 101 | $path = $app['config']->get('modules.paths.modules'); |
102 | 102 | |
103 | 103 | return new Repository($app, $path); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $process->setTimeout($this->timeout); |
136 | 136 | |
137 | 137 | if ($this->console instanceof Command) { |
138 | - $process->run(function ($type, $line) { |
|
138 | + $process->run(function($type, $line) { |
|
139 | 139 | $this->console->line($line); |
140 | 140 | }); |
141 | 141 | } |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | public function getPackageName() |
240 | 240 | { |
241 | 241 | if (is_null($this->version)) { |
242 | - return $this->name . ':dev-master'; |
|
242 | + return $this->name.':dev-master'; |
|
243 | 243 | } |
244 | 244 | |
245 | - return $this->name . ':' . $this->version; |
|
245 | + return $this->name.':'.$this->version; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -156,8 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | $process = $this->installViaGit(); |
159 | - } |
|
160 | - else { |
|
159 | + } else { |
|
161 | 160 | $process = $this->installViaComposer(); |
162 | 161 | } |
163 | 162 | |
@@ -201,10 +200,11 @@ discard block |
||
201 | 200 | |
202 | 201 | default: |
203 | 202 | $parts = explode('.', $this->type); |
204 | - if (end($parts) == "git") |
|
205 | - return $this->type; |
|
206 | - else |
|
207 | - return "{$this->type}:{$this->name}.git"; |
|
203 | + if (end($parts) == "git") { |
|
204 | + return $this->type; |
|
205 | + } else { |
|
206 | + return "{$this->type}:{$this->name}.git"; |
|
207 | + } |
|
208 | 208 | break; |
209 | 209 | } |
210 | 210 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $lowerName = $this->getLowerName(); |
161 | 161 | |
162 | - $langPath = $this->getPath() . "/Resources/lang"; |
|
162 | + $langPath = $this->getPath()."/Resources/lang"; |
|
163 | 163 | |
164 | 164 | if (is_dir($langPath)) { |
165 | 165 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $file = 'module.json'; |
178 | 178 | } |
179 | 179 | |
180 | - return new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
180 | + return new Json($this->getPath().'/'.$file, $this->app['files']); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | protected function fireEvent($event) |
229 | 229 | { |
230 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
230 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | protected function registerFiles() |
258 | 258 | { |
259 | 259 | foreach ($this->get('files', []) as $file) { |
260 | - include $this->path . '/' . $file; |
|
260 | + include $this->path.'/'.$file; |
|
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | */ |
381 | 381 | public function getExtraPath($path) |
382 | 382 | { |
383 | - return $this->getPath() . '/' . $path; |
|
383 | + return $this->getPath().'/'.$path; |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | /** |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @param Application $app |
40 | 40 | * @param $name |
41 | - * @param $path |
|
41 | + * @param string $path |
|
42 | 42 | */ |
43 | 43 | public function __construct(Application $app, $name, $path) |
44 | 44 | { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * Get json contents. |
184 | 184 | * |
185 | - * @param $file |
|
185 | + * @param string $file |
|
186 | 186 | * |
187 | 187 | * @return Json |
188 | 188 | */ |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | /** |
212 | 212 | * Get a specific data from composer.json file by given the key. |
213 | 213 | * |
214 | - * @param $key |
|
214 | + * @param string $key |
|
215 | 215 | * @param null $default |
216 | 216 | * |
217 | 217 | * @return mixed |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | /** |
290 | 290 | * Determine whether the given status same with the current module status. |
291 | 291 | * |
292 | - * @param $status |
|
292 | + * @param integer $status |
|
293 | 293 | * |
294 | 294 | * @return bool |
295 | 295 | */ |
@@ -341,9 +341,9 @@ discard block |
||
341 | 341 | /** |
342 | 342 | * Set active state for current module. |
343 | 343 | * |
344 | - * @param $active |
|
344 | + * @param integer $active |
|
345 | 345 | * |
346 | - * @return bool |
|
346 | + * @return integer |
|
347 | 347 | */ |
348 | 348 | public function setActive($active) |
349 | 349 | { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | 'stubs' => [ |
26 | 26 | 'enabled' => false, |
27 | - 'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
27 | + 'path' => base_path().'/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
28 | 28 | 'files' => [ |
29 | 29 | 'start' => 'start.php', |
30 | 30 | 'routes' => 'Http/routes.php', |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | $controllerPath = $this->laravel['modules']->config('paths.generator.controller'); |
45 | 45 | |
46 | - return $path . $controllerPath . '/' . $this->getControllerName() . '.php'; |
|
46 | + return $path.$controllerPath.'/'.$this->getControllerName().'.php'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function getPath() |
90 | 90 | { |
91 | - return static::getBasePath() . $this->path; |
|
91 | + return static::getBasePath().$this->path; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $contents = file_get_contents($this->getPath()); |
122 | 122 | |
123 | 123 | foreach ($this->replaces as $search => $replace) { |
124 | - $contents = str_replace('$' . strtoupper($search) . '$', $replace, $contents); |
|
124 | + $contents = str_replace('$'.strtoupper($search).'$', $replace, $contents); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | return $contents; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function saveTo($path, $filename) |
149 | 149 | { |
150 | - return file_put_contents($path . '/' . $filename, $this->getContents()); |
|
150 | + return file_put_contents($path.'/'.$filename, $this->getContents()); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |