@@ -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 | } |
@@ -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 | { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | parent::__construct($app); |
| 50 | 50 | $this->name = $name; |
| 51 | 51 | $this->path = realpath($path); |
| 52 | - $this->moduleJson = new Json($this->getPath() . '/module.json', $this->app['files']); |
|
| 52 | + $this->moduleJson = new Json($this->getPath().'/module.json', $this->app['files']); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | { |
| 178 | 178 | $lowerName = $this->getLowerName(); |
| 179 | 179 | |
| 180 | - $langPath = $this->getPath() . "/Resources/lang"; |
|
| 180 | + $langPath = $this->getPath()."/Resources/lang"; |
|
| 181 | 181 | |
| 182 | 182 | if (is_dir($langPath)) { |
| 183 | 183 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | return $this->moduleJson; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - return new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 200 | + return new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | protected function fireEvent($event) |
| 249 | 249 | { |
| 250 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 250 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | /** |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | protected function registerFiles() |
| 278 | 278 | { |
| 279 | 279 | foreach ($this->get('files', []) as $file) { |
| 280 | - include $this->path . '/' . $file; |
|
| 280 | + include $this->path.'/'.$file; |
|
| 281 | 281 | } |
| 282 | 282 | } |
| 283 | 283 | |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | */ |
| 399 | 399 | public function getExtraPath($path) |
| 400 | 400 | { |
| 401 | - return $this->getPath() . '/' . $path; |
|
| 401 | + return $this->getPath().'/'.$path; |
|
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | /** |