Completed
Pull Request — master (#1102)
by
unknown
01:48
created
src/Providers/ConsoleServiceProvider.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@
 block discarded – undo
124 124
 
125 125
         foreach (config('modules.commands', $this->commands) as $command) {
126 126
             $commands[] = Str::contains($command, $this->consoleNamespace) ?
127
-                $command :
128
-                $this->consoleNamespace  . "\\";
127
+                $command : $this->consoleNamespace."\\";
129 128
         }
130 129
 
131 130
         return $commands;
Please login to merge, or discard this patch.
src/FileRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $paths = array_merge($paths, $this->config('scan.paths'));
117 117
         }
118 118
 
119
-        $paths = array_map(function ($path) {
119
+        $paths = array_map(function($path) {
120 120
             return Str::endsWith($path, '/*') ? $path : Str::finish($path, '/*');
121 121
         }, $paths);
122 122
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function getCached()
202 202
     {
203
-        return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
203
+        return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
204 204
             return $this->toCollection()->toArray();
205 205
         });
206 206
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     {
290 290
         $modules = $this->allEnabled();
291 291
 
292
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
292
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
293 293
             if ($a->get('priority') === $b->get('priority')) {
294 294
                 return 0;
295 295
             }
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
     public function getModulePath($module)
419 419
     {
420 420
         try {
421
-            return $this->findOrFail($module)->getPath() . '/';
421
+            return $this->findOrFail($module)->getPath().'/';
422 422
         } catch (ModuleNotFoundException $e) {
423
-            return $this->getPath() . '/' . Str::studly($module) . '/';
423
+            return $this->getPath().'/'.Str::studly($module).'/';
424 424
         }
425 425
     }
426 426
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
      */
430 430
     public function assetPath(string $module) : string
431 431
     {
432
-        return $this->config('paths.assets') . '/' . $module;
432
+        return $this->config('paths.assets').'/'.$module;
433 433
     }
434 434
 
435 435
     /**
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      */
438 438
     public function config(string $key, $default = null)
439 439
     {
440
-        return $this->config->get('modules.' . $key, $default);
440
+        return $this->config->get('modules.'.$key, $default);
441 441
     }
442 442
 
443 443
     /**
@@ -527,9 +527,9 @@  discard block
 block discarded – undo
527 527
         }
528 528
         list($name, $url) = explode(':', $asset);
529 529
 
530
-        $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
530
+        $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
531 531
 
532
-        $url = $this->url->asset($baseUrl . "/{$name}/" . $url);
532
+        $url = $this->url->asset($baseUrl."/{$name}/".$url);
533 533
 
534 534
         return str_replace(['http://', 'https://'], '//', $url);
535 535
     }
Please login to merge, or discard this patch.
src/Commands/FactoryMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $factoryPath = GenerateConfigReader::read('factory');
71 71
 
72
-        return $path . $factoryPath->getPath() . '/' . $this->getFileName();
72
+        return $path.$factoryPath->getPath().'/'.$this->getFileName();
73 73
     }
74 74
 
75 75
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     private function getFileName()
79 79
     {
80
-        return Str::studly($this->argument('name')) . 'Factory.php';
80
+        return Str::studly($this->argument('name')).'Factory.php';
81 81
     }
82 82
 
83 83
     /**
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function getModelNamespace(): string
109 109
     {
110
-        return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $this->laravel['modules']->config('paths.generator.model.path', 'Entities');
110
+        return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$this->laravel['modules']->config('paths.generator.model.path', 'Entities');
111 111
     }
112 112
 }
Please login to merge, or discard this patch.
config/lumen-config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     'stubs' => [
28 28
         'enabled' => false,
29
-        'path' => base_path() . '/vendor/Nwidart/laravel-modules/src/Commands/stubs',
29
+        'path' => base_path().'/vendor/Nwidart/laravel-modules/src/Commands/stubs',
30 30
         'files' => [
31 31
             'routes/lumen-api' => 'Routes/api.php',
32 32
             'scaffold/config' => 'Config/config.php',
Please login to merge, or discard this patch.
src/ModulesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     protected function registerNamespaces()
38 38
     {
39 39
         $configPath = (app() instanceof \Illuminate\Foundation\Application) ? 'config.php' : 'lumen-config.php';
40
-        $configPath = __DIR__ . "/../config/" . $configPath;
40
+        $configPath = __DIR__."/../config/".$configPath;
41 41
 
42 42
         $this->mergeConfigFrom($configPath, 'modules');
43 43
         $this->publishes([
Please login to merge, or discard this patch.
src/Commands/RouteProviderMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
         $generatorPath = GenerateConfigReader::read('provider');
91 91
 
92
-        return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php';
92
+        return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php';
93 93
     }
94 94
 
95 95
     /**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     protected function getWebRoutesPath()
99 99
     {
100
-        return '/' . $this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php');
100
+        return '/'.$this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php');
101 101
     }
102 102
 
103 103
     /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     protected function getApiRoutesPath()
107 107
     {
108 108
         $routeStubPath = $this->isLaravelApplication() ? 'api' : 'lumen-api';
109
-        return '/' . $this->laravel['modules']->config("stubs.files.routes/$routeStubPath", 'Routes/api.php');
109
+        return '/'.$this->laravel['modules']->config("stubs.files.routes/$routeStubPath", 'Routes/api.php');
110 110
     }
111 111
 
112 112
     public function getDefaultNamespace() : string
Please login to merge, or discard this patch.