@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function setupStubPath() |
| 32 | 32 | { |
| 33 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 33 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
| 34 | 34 | |
| 35 | - $this->app->booted(function ($app) { |
|
| 35 | + $this->app->booted(function($app) { |
|
| 36 | 36 | if ($app['modules']->config('stubs.enabled') === true) { |
| 37 | 37 | Stub::setBasePath($app['modules']->config('stubs.path')); |
| 38 | 38 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | protected function registerServices() |
| 46 | 46 | { |
| 47 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
| 47 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
| 48 | 48 | $path = $app['config']->get('modules.paths.modules'); |
| 49 | 49 | |
| 50 | 50 | return new Laravel\LaravelFileRepository($app, $path); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | { |
| 191 | 191 | $lowerName = $this->getLowerName(); |
| 192 | 192 | |
| 193 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
| 193 | + $langPath = $this->getPath().'/Resources/lang'; |
|
| 194 | 194 | |
| 195 | 195 | if (is_dir($langPath)) { |
| 196 | 196 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -210,8 +210,8 @@ discard block |
||
| 210 | 210 | $file = 'module.json'; |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - return array_get($this->moduleJson, $file, function () use ($file) { |
|
| 214 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 213 | + return array_get($this->moduleJson, $file, function() use ($file) { |
|
| 214 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 215 | 215 | }); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | protected function fireEvent($event) |
| 266 | 266 | { |
| 267 | - $this->app['events']->dispatch(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 267 | + $this->app['events']->dispatch(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 268 | 268 | } |
| 269 | 269 | /** |
| 270 | 270 | * Register the aliases from this module. |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | protected function registerFiles() |
| 290 | 290 | { |
| 291 | 291 | foreach ($this->get('files', []) as $file) { |
| 292 | - include $this->path . '/' . $file; |
|
| 292 | + include $this->path.'/'.$file; |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | */ |
| 391 | 391 | public function getExtraPath(string $path) : string |
| 392 | 392 | { |
| 393 | - return $this->getPath() . '/' . $path; |
|
| 393 | + return $this->getPath().'/'.$path; |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
@@ -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 | 'routes/web' => 'Routes/web.php', |
| 30 | 30 | 'routes/api' => 'Routes/api.php', |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $generatorPath = GenerateConfigReader::read('provider'); |
| 80 | 80 | |
| 81 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 81 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | protected function getWebRoutesPath() |
| 88 | 88 | { |
| 89 | - return '/' . $this->laravel['config']->get('stubs.files.routes', 'Routes/web.php'); |
|
| 89 | + return '/'.$this->laravel['config']->get('stubs.files.routes', 'Routes/web.php'); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | protected function getApiRoutesPath() |
| 96 | 96 | { |
| 97 | - return '/' . $this->laravel['config']->get('stubs.files.routes', 'Routes/api.php'); |
|
| 97 | + return '/'.$this->laravel['config']->get('stubs.files.routes', 'Routes/api.php'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | public function getDefaultNamespace() : string |
@@ -426,10 +426,10 @@ |
||
| 426 | 426 | protected function getMakeSeedArguments() |
| 427 | 427 | { |
| 428 | 428 | return [ |
| 429 | - 'name' => $this->getName(), |
|
| 430 | - 'module' => $this->getName(), |
|
| 431 | - '--master' => true, |
|
| 432 | - ]; |
|
| 429 | + 'name' => $this->getName(), |
|
| 430 | + 'module' => $this->getName(), |
|
| 431 | + '--master' => true, |
|
| 432 | + ]; |
|
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | /** |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | continue; |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
| 306 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
| 307 | 307 | |
| 308 | 308 | $this->filesystem->makeDirectory($path, 0755, true); |
| 309 | 309 | if (config('modules.stubs.gitkeep')) { |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | public function generateGitKeep($path) |
| 321 | 321 | { |
| 322 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
| 322 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /** |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
| 337 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
| 338 | 338 | |
| 339 | 339 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 340 | 340 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | protected function getMakeProviderArguments() |
| 388 | 388 | { |
| 389 | 389 | $arguments = [ |
| 390 | - 'name' => $this->getName() . 'ServiceProvider', |
|
| 390 | + 'name' => $this->getName().'ServiceProvider', |
|
| 391 | 391 | 'module' => $this->getName(), |
| 392 | 392 | '--master' => true, |
| 393 | 393 | ]; |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | protected function getMakeControllerArguments() |
| 408 | 408 | { |
| 409 | 409 | $arguments = [ |
| 410 | - 'controller' => $this->getName() . 'Controller', |
|
| 410 | + 'controller' => $this->getName().'Controller', |
|
| 411 | 411 | 'module' => $this->getName(), |
| 412 | 412 | ]; |
| 413 | 413 | if ($this->api === true) { |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | protected function getStubContents($stub) |
| 443 | 443 | { |
| 444 | 444 | return (new Stub( |
| 445 | - '/' . $stub . '.stub', |
|
| 445 | + '/'.$stub.'.stub', |
|
| 446 | 446 | $this->getReplacement($stub) |
| 447 | 447 | ) |
| 448 | 448 | )->render(); |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $replaces = []; |
| 477 | 477 | |
| 478 | 478 | foreach ($keys as $key) { |
| 479 | - if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) { |
|
| 479 | + if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) { |
|
| 480 | 480 | $replaces[$key] = $this->$method(); |
| 481 | 481 | } else { |
| 482 | 482 | $replaces[$key] = null; |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | */ |
| 492 | 492 | private function generateModuleJsonFile() |
| 493 | 493 | { |
| 494 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 494 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 495 | 495 | |
| 496 | 496 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 497 | 497 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -508,13 +508,13 @@ discard block |
||
| 508 | 508 | */ |
| 509 | 509 | private function cleanModuleJsonFile() |
| 510 | 510 | { |
| 511 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 511 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 512 | 512 | |
| 513 | 513 | $content = $this->filesystem->get($path); |
| 514 | 514 | $namespace = $this->getModuleNamespaceReplacement(); |
| 515 | 515 | $studlyName = $this->getStudlyNameReplacement(); |
| 516 | 516 | |
| 517 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 517 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 518 | 518 | |
| 519 | 519 | $content = str_replace($provider, '', $content); |
| 520 | 520 | |