@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | /** |
93 | 93 | * Get scanned modules paths. |
94 | 94 | * |
95 | - * @return array |
|
95 | + * @return string[] |
|
96 | 96 | */ |
97 | 97 | public function getScanPaths() |
98 | 98 | { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | /** |
403 | 403 | * Get module path for a specific module. |
404 | 404 | * |
405 | - * @param $module |
|
405 | + * @param string $module |
|
406 | 406 | * |
407 | 407 | * @return string |
408 | 408 | */ |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | /** |
431 | 431 | * Get a specific config data from a configuration file. |
432 | 432 | * |
433 | - * @param $key |
|
433 | + * @param string $key |
|
434 | 434 | * |
435 | 435 | * @param null $default |
436 | 436 | * @return mixed |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | /** |
472 | 472 | * Get module used for cli session. |
473 | 473 | * |
474 | - * @return string |
|
474 | + * @return Module |
|
475 | 475 | */ |
476 | 476 | public function getUsedNow() |
477 | 477 | { |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | /** |
482 | 482 | * Get used now. |
483 | 483 | * |
484 | - * @return string |
|
484 | + * @return Module |
|
485 | 485 | */ |
486 | 486 | public function getUsed() |
487 | 487 | { |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | * |
556 | 556 | * @param string $name |
557 | 557 | * |
558 | - * @return bool |
|
558 | + * @return boolean|null |
|
559 | 559 | */ |
560 | 560 | public function enable($name) |
561 | 561 | { |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | * |
568 | 568 | * @param string $name |
569 | 569 | * |
570 | - * @return bool |
|
570 | + * @return boolean|null |
|
571 | 571 | */ |
572 | 572 | public function disable($name) |
573 | 573 | { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $paths = $this->paths; |
101 | 101 | |
102 | - $paths[] = $this->getPath() . '/*'; |
|
102 | + $paths[] = $this->getPath().'/*'; |
|
103 | 103 | |
104 | 104 | if ($this->config('scan.enabled')) { |
105 | 105 | $paths = array_merge($paths, $this->config('scan.paths')); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $modules = []; |
161 | 161 | |
162 | 162 | foreach ($cached as $name => $module) { |
163 | - $path = $this->config('paths.modules') . '/' . $name; |
|
163 | + $path = $this->config('paths.modules').'/'.$name; |
|
164 | 164 | |
165 | 165 | $modules[$name] = new Module($this->app, $name, $path); |
166 | 166 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function getCached() |
177 | 177 | { |
178 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
178 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
179 | 179 | return $this->toCollection()->toArray(); |
180 | 180 | }); |
181 | 181 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | { |
264 | 264 | $modules = $this->enabled(); |
265 | 265 | |
266 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
266 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
267 | 267 | if ($a->order == $b->order) { |
268 | 268 | return 0; |
269 | 269 | } |
@@ -412,9 +412,9 @@ discard block |
||
412 | 412 | public function getModulePath($module) |
413 | 413 | { |
414 | 414 | try { |
415 | - return $this->findOrFail($module)->getPath() . '/'; |
|
415 | + return $this->findOrFail($module)->getPath().'/'; |
|
416 | 416 | } catch (ModuleNotFoundException $e) { |
417 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
417 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
418 | 418 | } |
419 | 419 | } |
420 | 420 | |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | */ |
428 | 428 | public function assetPath($module) |
429 | 429 | { |
430 | - return $this->config('paths.assets') . '/' . $module; |
|
430 | + return $this->config('paths.assets').'/'.$module; |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | /** |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | */ |
441 | 441 | public function config($key, $default = null) |
442 | 442 | { |
443 | - return $this->app['config']->get('modules.' . $key, $default); |
|
443 | + return $this->app['config']->get('modules.'.$key, $default); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -525,9 +525,9 @@ discard block |
||
525 | 525 | } |
526 | 526 | list($name, $url) = explode(':', $asset); |
527 | 527 | |
528 | - $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
528 | + $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
529 | 529 | |
530 | - $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url); |
|
530 | + $url = $this->app['url']->asset($baseUrl."/{$name}/".$url); |
|
531 | 531 | |
532 | 532 | return str_replace(['http://', 'https://'], '//', $url); |
533 | 533 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | /** |
91 | 91 | * Get matches data from regex. |
92 | 92 | * |
93 | - * @return array |
|
93 | + * @return string[] |
|
94 | 94 | */ |
95 | 95 | public function getMatches() |
96 | 96 | { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getMigrations($reverse = false) |
85 | 85 | { |
86 | - $files = $this->laravel['files']->glob($this->getPath() . '/*_*.php'); |
|
86 | + $files = $this->laravel['files']->glob($this->getPath().'/*_*.php'); |
|
87 | 87 | |
88 | 88 | // Once we have the array of files in the directory we will just remove the |
89 | 89 | // extension and take the basename of the file which is all we need when |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return array(); |
93 | 93 | } |
94 | 94 | |
95 | - $files = array_map(function ($file) { |
|
95 | + $files = array_map(function($file) { |
|
96 | 96 | return str_replace('.php', '', basename($file)); |
97 | 97 | |
98 | 98 | }, $files); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | { |
211 | 211 | $path = $this->getPath(); |
212 | 212 | foreach ($files as $file) { |
213 | - $this->laravel['files']->requireOnce($path . '/' . $file . '.php'); |
|
213 | + $this->laravel['files']->requireOnce($path.'/'.$file.'.php'); |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | |
290 | 290 | $result = $query->orderBy('migration', 'desc')->get(); |
291 | 291 | |
292 | - return collect($result)->map(function ($item) { |
|
292 | + return collect($result)->map(function($item) { |
|
293 | 293 | return (array) $item; |
294 | 294 | })->pluck('migration'); |
295 | 295 | } |
@@ -242,7 +242,7 @@ |
||
242 | 242 | * |
243 | 243 | * @param string $migration |
244 | 244 | * |
245 | - * @return mixed |
|
245 | + * @return boolean |
|
246 | 246 | */ |
247 | 247 | public function log($migration) |
248 | 248 | { |
@@ -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 | |
54 | 54 | $this->rollback($module); |
55 | 55 | } |
@@ -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 | |
54 | 54 | $this->reset($module); |
55 | 55 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $mailPath = $this->laravel['modules']->config('paths.generator.notifications', 'Notifications'); |
47 | 47 | |
48 | - return $path . $mailPath . '/' . $this->getFileName() . '.php'; |
|
48 | + return $path.$mailPath.'/'.$this->getFileName().'.php'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -19,11 +19,11 @@ |
||
19 | 19 | |
20 | 20 | protected $argumentName = 'name'; |
21 | 21 | |
22 | - /** |
|
23 | - * The console command description. |
|
24 | - * |
|
25 | - * @var string |
|
26 | - */ |
|
22 | + /** |
|
23 | + * The console command description. |
|
24 | + * |
|
25 | + * @var string |
|
26 | + */ |
|
27 | 27 | protected $description = 'Generate new notification class for the specified module.'; |
28 | 28 | |
29 | 29 | /** |
@@ -86,11 +86,11 @@ |
||
86 | 86 | |
87 | 87 | $namespace = $this->laravel['modules']->config('namespace'); |
88 | 88 | |
89 | - $namespace .= '\\' . $module->getStudlyName(); |
|
89 | + $namespace .= '\\'.$module->getStudlyName(); |
|
90 | 90 | |
91 | - $namespace .= '\\' . $this->getDefaultNamespace(); |
|
91 | + $namespace .= '\\'.$this->getDefaultNamespace(); |
|
92 | 92 | |
93 | - $namespace .= '\\' . $extra; |
|
93 | + $namespace .= '\\'.$extra; |
|
94 | 94 | |
95 | 95 | return trim($namespace, '\\'); |
96 | 96 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | $mailPath = $this->laravel['modules']->config('paths.generator.emails', 'Emails'); |
67 | 67 | |
68 | - return $path . $mailPath . '/' . $this->getFileName() . '.php'; |
|
68 | + return $path.$mailPath.'/'.$this->getFileName().'.php'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -123,14 +123,14 @@ |
||
123 | 123 | |
124 | 124 | // any JSON parsing errors should throw an exception |
125 | 125 | if (json_last_error() > 0) { |
126 | - throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg()); |
|
126 | + throw new InvalidJsonException('Error processing file: '.$this->getPath().'. Error: '.json_last_error_msg()); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | if (config('modules.cache.enabled') === false) { |
130 | 130 | return $attributes; |
131 | 131 | } |
132 | 132 | |
133 | - return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () use ($attributes) { |
|
133 | + return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function() use ($attributes) { |
|
134 | 134 | return $attributes; |
135 | 135 | }); |
136 | 136 | } |