@@ -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 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $paths = array_merge($paths, $this->config('scan.paths')); |
93 | 93 | } |
94 | 94 | |
95 | - return array_map(function ($path) { |
|
95 | + return array_map(function($path) { |
|
96 | 96 | return ends_with($path, '/*') ? $path : str_finish($path, '/*'); |
97 | 97 | }, $paths); |
98 | 98 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function all() : array |
139 | 139 | { |
140 | - if (! $this->config('cache.enabled')) { |
|
140 | + if (!$this->config('cache.enabled')) { |
|
141 | 141 | return $this->scan(); |
142 | 142 | } |
143 | 143 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function getCached() |
172 | 172 | { |
173 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
173 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
174 | 174 | return $this->toCollection()->toArray(); |
175 | 175 | }); |
176 | 176 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | { |
256 | 256 | $modules = $this->allEnabled(); |
257 | 257 | |
258 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
258 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
259 | 259 | if ($a->order == $b->order) { |
260 | 260 | return 0; |
261 | 261 | } |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | { |
367 | 367 | $module = $this->find($name); |
368 | 368 | |
369 | - if (! is_null($module)) { |
|
369 | + if (!is_null($module)) { |
|
370 | 370 | return $module; |
371 | 371 | } |
372 | 372 | |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | |
438 | 438 | $path = storage_path('app/modules/modules.used'); |
439 | 439 | |
440 | - if (! $this->app['files']->exists($path)) { |
|
440 | + if (!$this->app['files']->exists($path)) { |
|
441 | 441 | $this->app['files']->put($path, ''); |
442 | 442 | } |
443 | 443 | |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | */ |
542 | 542 | public function disabled($name) : bool |
543 | 543 | { |
544 | - return ! $this->enabled($name); |
|
544 | + return !$this->enabled($name); |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | /** |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | */ |
614 | 614 | public function getStubPath() |
615 | 615 | { |
616 | - if (! is_null($this->stubPath)) { |
|
616 | + if (!is_null($this->stubPath)) { |
|
617 | 617 | return $this->stubPath; |
618 | 618 | } |
619 | 619 |
@@ -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 | } |