@@ -135,7 +135,7 @@ |
||
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 | } |
@@ -169,17 +169,17 @@ |
||
169 | 169 | */ |
170 | 170 | public function publish() |
171 | 171 | { |
172 | - if (! $this->console instanceof Command) { |
|
172 | + if (!$this->console instanceof Command) { |
|
173 | 173 | $message = "The 'console' property must instance of \\Illuminate\\Console\\Command."; |
174 | 174 | |
175 | 175 | throw new \RuntimeException($message); |
176 | 176 | } |
177 | 177 | |
178 | - if (! $this->getFilesystem()->isDirectory($sourcePath = $this->getSourcePath())) { |
|
178 | + if (!$this->getFilesystem()->isDirectory($sourcePath = $this->getSourcePath())) { |
|
179 | 179 | return; |
180 | 180 | } |
181 | 181 | |
182 | - if (! $this->getFilesystem()->isDirectory($destinationPath = $this->getDestinationPath())) { |
|
182 | + if (!$this->getFilesystem()->isDirectory($destinationPath = $this->getDestinationPath())) { |
|
183 | 183 | $this->getFilesystem()->makeDirectory($destinationPath, 0775, true); |
184 | 184 | } |
185 | 185 |
@@ -132,7 +132,7 @@ |
||
132 | 132 | public function generate() |
133 | 133 | { |
134 | 134 | $path = $this->getPath(); |
135 | - if (! $this->filesystem->exists($path)) { |
|
135 | + if (!$this->filesystem->exists($path)) { |
|
136 | 136 | return $this->filesystem->put($path, $this->getContents()); |
137 | 137 | } |
138 | 138 | if ($this->overwriteFile === true) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $concatenatedPackages .= "\"{$name}:{$version}\" "; |
45 | 45 | } |
46 | 46 | |
47 | - if (! empty($concatenatedPackages)) { |
|
47 | + if (!empty($concatenatedPackages)) { |
|
48 | 48 | $this->run("composer require {$concatenatedPackages}{$this->isComposerSilenced()}"); |
49 | 49 | } |
50 | 50 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $concatenatedPackages .= "\"{$name}:{$version}\" "; |
62 | 62 | } |
63 | 63 | |
64 | - if (! empty($concatenatedPackages)) { |
|
64 | + if (!empty($concatenatedPackages)) { |
|
65 | 65 | $this->run("composer require --dev {$concatenatedPackages}{$this->isComposerSilenced()}"); |
66 | 66 | } |
67 | 67 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function handle(): int |
29 | 29 | { |
30 | 30 | $this->components->twoColumnDetail('<fg=gray>Status / Name</>', '<fg=gray>Path / priority</>'); |
31 | - collect($this->getRows())->each(function ($row) { |
|
31 | + collect($this->getRows())->each(function($row) { |
|
32 | 32 | |
33 | 33 | $this->components->twoColumnDetail("[{$row[1]}] {$row[0]}", "{$row[3]} [{$row[2]}]"); |
34 | 34 | }); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | // This checks if we are running on a Laravel Vapor managed instance |
19 | 19 | // and sets the path to a writable one (services path is not on a writable storage in Vapor). |
20 | - if (! is_null(env('VAPOR_MAINTENANCE_MODE', null))) { |
|
20 | + if (!is_null(env('VAPOR_MAINTENANCE_MODE', null))) { |
|
21 | 21 | return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath()); |
22 | 22 | } |
23 | 23 |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function hasStatus(Module $module, bool $status): bool |
111 | 111 | { |
112 | - if (! isset($this->modulesStatuses[$module->getName()])) { |
|
112 | + if (!isset($this->modulesStatuses[$module->getName()])) { |
|
113 | 113 | return $status === false; |
114 | 114 | } |
115 | 115 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function delete(Module $module): void |
141 | 141 | { |
142 | - if (! isset($this->modulesStatuses[$module->getName()])) { |
|
142 | + if (!isset($this->modulesStatuses[$module->getName()])) { |
|
143 | 143 | return; |
144 | 144 | } |
145 | 145 | unset($this->modulesStatuses[$module->getName()]); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | private function readJson(): array |
164 | 164 | { |
165 | - if (! $this->files->exists($this->statusesFile)) { |
|
165 | + if (!$this->files->exists($this->statusesFile)) { |
|
166 | 166 | return []; |
167 | 167 | } |
168 | 168 | |
@@ -177,11 +177,11 @@ discard block |
||
177 | 177 | */ |
178 | 178 | private function getModulesStatuses(): array |
179 | 179 | { |
180 | - if (! $this->config->get('modules.cache.enabled')) { |
|
180 | + if (!$this->config->get('modules.cache.enabled')) { |
|
181 | 181 | return $this->readJson(); |
182 | 182 | } |
183 | 183 | |
184 | - return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->cacheKey, $this->cacheLifetime, function () { |
|
184 | + return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->cacheKey, $this->cacheLifetime, function() { |
|
185 | 185 | return $this->readJson(); |
186 | 186 | }); |
187 | 187 | } |
@@ -407,8 +407,8 @@ discard block |
||
407 | 407 | foreach ($this->getFiles() as $stub => $file) { |
408 | 408 | $path = $this->module->getModulePath($this->getName()).$file; |
409 | 409 | |
410 | - $this->component->task("Generating file {$path}", function () use ($stub, $path) { |
|
411 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
410 | + $this->component->task("Generating file {$path}", function() use ($stub, $path) { |
|
411 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
412 | 412 | $this->filesystem->makeDirectory($dir, 0775, true); |
413 | 413 | } |
414 | 414 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $eventGeneratorConfig = GenerateConfigReader::read('event-provider'); |
451 | 451 | if ( |
452 | 452 | (is_null($eventGeneratorConfig->getPath()) && $providerGenerator->generate()) |
453 | - || (! is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate()) |
|
453 | + || (!is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate()) |
|
454 | 454 | ) { |
455 | 455 | $this->console->call('module:make-event-provider', [ |
456 | 456 | 'module' => $this->getName(), |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $routeGeneratorConfig = GenerateConfigReader::read('route-provider'); |
470 | 470 | if ( |
471 | 471 | (is_null($routeGeneratorConfig->getPath()) && $providerGenerator->generate()) |
472 | - || (! is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate()) |
|
472 | + || (!is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate()) |
|
473 | 473 | ) { |
474 | 474 | $this->console->call('module:route-provider', [ |
475 | 475 | 'module' => $this->getName(), |
@@ -527,11 +527,11 @@ discard block |
||
527 | 527 | { |
528 | 528 | $replacements = $this->module->config('stubs.replacements'); |
529 | 529 | |
530 | - if (! isset($replacements['composer']['APP_FOLDER_NAME'])) { |
|
530 | + if (!isset($replacements['composer']['APP_FOLDER_NAME'])) { |
|
531 | 531 | $replacements['composer'][] = 'APP_FOLDER_NAME'; |
532 | 532 | } |
533 | 533 | |
534 | - if (! isset($replacements[$stub])) { |
|
534 | + if (!isset($replacements[$stub])) { |
|
535 | 535 | return []; |
536 | 536 | } |
537 | 537 | |
@@ -562,8 +562,8 @@ discard block |
||
562 | 562 | { |
563 | 563 | $path = $this->module->getModulePath($this->getName()).'module.json'; |
564 | 564 | |
565 | - $this->component->task("Generating file $path", function () use ($path) { |
|
566 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
565 | + $this->component->task("Generating file $path", function() use ($path) { |
|
566 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
567 | 567 | $this->filesystem->makeDirectory($dir, 0775, true); |
568 | 568 | } |
569 | 569 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function toArray() |
26 | 26 | { |
27 | - return array_map(function ($value) { |
|
27 | + return array_map(function($value) { |
|
28 | 28 | if ($value instanceof Module) { |
29 | 29 | $attributes = $value->json()->getAttributes(); |
30 | 30 | $attributes['path'] = $value->getPath(); |