@@ -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 | /** |
@@ -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 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @param Application $app |
| 37 | 37 | * @param $name |
| 38 | - * @param $path |
|
| 38 | + * @param string $path |
|
| 39 | 39 | */ |
| 40 | 40 | public function __construct(Application $app, $name, $path) |
| 41 | 41 | { |
@@ -169,6 +169,7 @@ discard block |
||
| 169 | 169 | /** |
| 170 | 170 | * Get json contents. |
| 171 | 171 | * |
| 172 | + * @param string $file |
|
| 172 | 173 | * @return Json |
| 173 | 174 | */ |
| 174 | 175 | public function json($file = null) |
@@ -196,7 +197,7 @@ discard block |
||
| 196 | 197 | /** |
| 197 | 198 | * Get a specific data from composer.json file by given the key. |
| 198 | 199 | * |
| 199 | - * @param $key |
|
| 200 | + * @param string $key |
|
| 200 | 201 | * @param null $default |
| 201 | 202 | * |
| 202 | 203 | * @return mixed |
@@ -274,7 +275,7 @@ discard block |
||
| 274 | 275 | /** |
| 275 | 276 | * Determine whether the given status same with the current module status. |
| 276 | 277 | * |
| 277 | - * @param $status |
|
| 278 | + * @param integer $status |
|
| 278 | 279 | * |
| 279 | 280 | * @return bool |
| 280 | 281 | */ |
@@ -326,9 +327,9 @@ discard block |
||
| 326 | 327 | /** |
| 327 | 328 | * Set active state for current module. |
| 328 | 329 | * |
| 329 | - * @param $active |
|
| 330 | + * @param integer $active |
|
| 330 | 331 | * |
| 331 | - * @return bool |
|
| 332 | + * @return integer |
|
| 332 | 333 | */ |
| 333 | 334 | public function setActive($active) |
| 334 | 335 | { |
@@ -338,7 +339,7 @@ discard block |
||
| 338 | 339 | /** |
| 339 | 340 | * Disable the current module. |
| 340 | 341 | * |
| 341 | - * @return bool |
|
| 342 | + * @return boolean|null |
|
| 342 | 343 | */ |
| 343 | 344 | public function disable() |
| 344 | 345 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function getMigrations($reverse = false) |
| 53 | 53 | { |
| 54 | - $files = $this->laravel['files']->glob($this->getPath() . '/*_*.php'); |
|
| 54 | + $files = $this->laravel['files']->glob($this->getPath().'/*_*.php'); |
|
| 55 | 55 | |
| 56 | 56 | // Once we have the array of files in the directory we will just remove the |
| 57 | 57 | // extension and take the basename of the file which is all we need when |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | return array(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $files = array_map(function ($file) { |
|
| 63 | + $files = array_map(function($file) { |
|
| 64 | 64 | return str_replace('.php', '', basename($file)); |
| 65 | 65 | |
| 66 | 66 | }, $files); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $path = $this->getPath(); |
| 180 | 180 | |
| 181 | 181 | foreach ($files as $file) { |
| 182 | - $this->laravel['files']->requireOnce($path . '/' . $file . '.php'); |
|
| 182 | + $this->laravel['files']->requireOnce($path.'/'.$file.'.php'); |
|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | |
| 260 | 260 | $result = $query->orderBy('migration', 'desc')->get(); |
| 261 | 261 | |
| 262 | - return collect($result)->map(function ($item) { |
|
| 262 | + return collect($result)->map(function($item) { |
|
| 263 | 263 | return (array) $item; |
| 264 | 264 | })->lists('migration'); |
| 265 | 265 | } |
@@ -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', |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach (array_reverse($this->laravel['modules']->all()) as $module) { |
| 45 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 45 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 46 | 46 | |
| 47 | 47 | $this->reset($module); |
| 48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach (array_reverse($this->laravel['modules']->all()) as $module) { |
| 45 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 45 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 46 | 46 | |
| 47 | 47 | $this->reset($module); |
| 48 | 48 | } |
@@ -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 | /** |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | /** |
| 108 | 108 | * Get the services provided by the provider. |
| 109 | 109 | * |
| 110 | - * @return array |
|
| 110 | + * @return string[] |
|
| 111 | 111 | */ |
| 112 | 112 | public function provides() |
| 113 | 113 | { |
@@ -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 | /** |