@@ -63,7 +63,7 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | private function generateDirectory($dir, $success, $error) |
| 65 | 65 | { |
| 66 | - if (! $this->laravel['files']->isDirectory($dir)) { |
|
| 66 | + if (!$this->laravel['files']->isDirectory($dir)) { |
|
| 67 | 67 | $this->laravel['files']->makeDirectory($dir, 0755, true, true); |
| 68 | 68 | |
| 69 | 69 | return $this->info($success); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $name = $this->argument('module'); |
| 47 | 47 | |
| 48 | - if (! empty($name)) { |
|
| 48 | + if (!empty($name)) { |
|
| 49 | 49 | return $this->reset($name); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $database = $this->option('database'); |
| 84 | 84 | |
| 85 | - if (! empty($database)) { |
|
| 85 | + if (!empty($database)) { |
|
| 86 | 86 | $migrator->setDatabase($database); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $module = studly_case($this->argument('module')); |
| 30 | 30 | |
| 31 | - if (! $this->laravel['modules']->has($module)) { |
|
| 31 | + if (!$this->laravel['modules']->has($module)) { |
|
| 32 | 32 | return $this->error("Module [{$module}] does not exist!"); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | $name = $this->argument('module'); |
| 41 | 41 | |
| 42 | - if (! empty($name)) { |
|
| 42 | + if (!empty($name)) { |
|
| 43 | 43 | $module = $this->module->findOrFail($name); |
| 44 | 44 | |
| 45 | 45 | return $this->migrateStatus($module); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $this->generateFolders(); |
| 253 | 253 | $this->generateModuleJsonFile(); |
| 254 | 254 | |
| 255 | - if (! $this->plain) { |
|
| 255 | + if (!$this->plain) { |
|
| 256 | 256 | $this->generateFiles(); |
| 257 | 257 | $this->generateResources(); |
| 258 | 258 | } else { |
@@ -270,13 +270,13 @@ discard block |
||
| 270 | 270 | foreach ($this->getFolders() as $key => $folder) { |
| 271 | 271 | $folder = GenerateConfigReader::read($key); |
| 272 | 272 | |
| 273 | - if (! $folder->generate()) { |
|
| 273 | + if (!$folder->generate()) { |
|
| 274 | 274 | continue; |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
| 278 | 278 | |
| 279 | - if (! $this->filesystem->isDirectory($path)) { |
|
| 279 | + if (!$this->filesystem->isDirectory($path)) { |
|
| 280 | 280 | $this->filesystem->makeDirectory($path, 0755, true); |
| 281 | 281 | } |
| 282 | 282 | |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | foreach ($this->getFiles() as $stub => $file) { |
| 305 | 305 | $path = $this->module->getModulePath($this->getName()) . $file; |
| 306 | 306 | |
| 307 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 307 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 308 | 308 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 309 | 309 | } |
| 310 | 310 | |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | { |
| 367 | 367 | $replacements = $this->module->config('stubs.replacements'); |
| 368 | 368 | |
| 369 | - if (! isset($replacements[$stub])) { |
|
| 369 | + if (!isset($replacements[$stub])) { |
|
| 370 | 370 | return []; |
| 371 | 371 | } |
| 372 | 372 | |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | { |
| 393 | 393 | $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
| 394 | 394 | |
| 395 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 395 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 396 | 396 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 397 | 397 | } |
| 398 | 398 | |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | */ |
| 119 | 119 | public function generate() |
| 120 | 120 | { |
| 121 | - if (! $this->filesystem->exists($path = $this->getPath())) { |
|
| 121 | + if (!$this->filesystem->exists($path = $this->getPath())) { |
|
| 122 | 122 | return $this->filesystem->put($path, $this->getContents()); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $file = 'module.json'; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - return array_get($this->moduleJson, $file, function () use ($file) { |
|
| 212 | + return array_get($this->moduleJson, $file, function() use ($file) { |
|
| 213 | 213 | return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']); |
| 214 | 214 | }); |
| 215 | 215 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $this->registerAliases(); |
| 247 | 247 | $this->registerProviders(); |
| 248 | 248 | |
| 249 | - if (! $this->isLoadFilesOnBoot()) { |
|
| 249 | + if (!$this->isLoadFilesOnBoot()) { |
|
| 250 | 250 | $this->registerFiles(); |
| 251 | 251 | } |
| 252 | 252 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | public function disabled() : bool |
| 330 | 330 | { |
| 331 | - return ! $this->enabled(); |
|
| 331 | + return !$this->enabled(); |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | return []; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - $files = array_map(function ($file) { |
|
| 101 | + $files = array_map(function($file) { |
|
| 102 | 102 | return str_replace('.php', '', basename($file)); |
| 103 | 103 | }, $files); |
| 104 | 104 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | $result = $query->orderBy('migration', 'desc')->get(); |
| 297 | 297 | |
| 298 | - return collect($result)->map(function ($item) { |
|
| 298 | + return collect($result)->map(function($item) { |
|
| 299 | 299 | return (array) $item; |
| 300 | 300 | })->pluck('migration'); |
| 301 | 301 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
| 38 | 38 | |
| 39 | - $this->app->booted(function ($app) { |
|
| 39 | + $this->app->booted(function($app) { |
|
| 40 | 40 | if ($app['modules']->config('stubs.enabled')) { |
| 41 | 41 | Stub::setBasePath($app['modules']->config('stubs.path')); |
| 42 | 42 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | protected function registerServices() |
| 50 | 50 | { |
| 51 | - $this->app->singleton('modules', function ($app) { |
|
| 51 | + $this->app->singleton('modules', function($app) { |
|
| 52 | 52 | $path = $app['config']->get('modules.paths.modules'); |
| 53 | 53 | |
| 54 | 54 | return new \Rawilk\LaravelModules\Laravel\Repository($app, $path); |