Completed
Pull Request — master (#259)
by
unknown
04:19
created
src/Traits/MigrationLoaderTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
      */
12 12
     protected function loadMigrationFiles($module)
13 13
     {
14
-        $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath();
14
+        $path = $this->laravel['modules']->getModulePath($module).$this->getMigrationGeneratorPath();
15 15
 
16
-        $files = $this->laravel['files']->glob($path . '/*_*.php');
16
+        $files = $this->laravel['files']->glob($path.'/*_*.php');
17 17
 
18 18
         foreach ($files as $file) {
19 19
             $this->laravel['files']->requireOnce($file);
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function setupStubPath()
57 57
     {
58
-        $this->app->booted(function ($app) {
59
-            Stub::setBasePath(__DIR__ . '/Commands/stubs');
58
+        $this->app->booted(function($app) {
59
+            Stub::setBasePath(__DIR__.'/Commands/stubs');
60 60
 
61 61
             if ($app['modules']->config('stubs.enabled') === true) {
62 62
                 Stub::setBasePath($app['modules']->config('stubs.path'));
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function registerNamespaces()
71 71
     {
72
-        $configPath = __DIR__ . '/../config/config.php';
72
+        $configPath = __DIR__.'/../config/config.php';
73 73
         $this->mergeConfigFrom($configPath, 'modules');
74 74
         $this->publishes([
75 75
             $configPath => config_path('modules.php'),
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     protected function registerServices()
99 99
     {
100
-        $this->app->singleton('modules', function ($app) {
100
+        $this->app->singleton('modules', function($app) {
101 101
             $path = $app['config']->get('modules.paths.modules');
102 102
 
103 103
             return new Repository($app, $path);
Please login to merge, or discard this patch.
src/Process/Installer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
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
         }
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
     public function getPackageName()
240 240
     {
241 241
         if (is_null($this->version)) {
242
-            return $this->name . ':dev-master';
242
+            return $this->name.':dev-master';
243 243
         }
244 244
 
245
-        return $this->name . ':' . $this->version;
245
+        return $this->name.':'.$this->version;
246 246
     }
247 247
 
248 248
     /**
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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
             'start' => 'start.php',
30 30
             'routes' => 'Http/routes.php',
Please login to merge, or discard this patch.
src/Commands/ControllerCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         $controllerPath = $this->laravel['modules']->config('paths.generator.controller');
45 45
 
46
-        return $path . $controllerPath . '/' . $this->getControllerName() . '.php';
46
+        return $path.$controllerPath.'/'.$this->getControllerName().'.php';
47 47
     }
48 48
 
49 49
     /**
Please login to merge, or discard this patch.
src/Support/Stub.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function getPath()
90 90
     {
91
-        return static::getBasePath() . $this->path;
91
+        return static::getBasePath().$this->path;
92 92
     }
93 93
 
94 94
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $contents = file_get_contents($this->getPath());
122 122
 
123 123
         foreach ($this->replaces as $search => $replace) {
124
-            $contents = str_replace('$' . strtoupper($search) . '$', $replace, $contents);
124
+            $contents = str_replace('$'.strtoupper($search).'$', $replace, $contents);
125 125
         }
126 126
 
127 127
         return $contents;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function saveTo($path, $filename)
149 149
     {
150
-        return file_put_contents($path . '/' . $filename, $this->getContents());
150
+        return file_put_contents($path.'/'.$filename, $this->getContents());
151 151
     }
152 152
 
153 153
     /**
Please login to merge, or discard this patch.
src/Commands/GenerateJobCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
         $jobPath = $this->laravel['modules']->config('paths.generator.jobs');
67 67
 
68
-        return $path . $jobPath . '/' . $this->getFileName() . '.php';
68
+        return $path.$jobPath.'/'.$this->getFileName().'.php';
69 69
     }
70 70
 
71 71
     /**
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $paths = $this->paths;
97 97
 
98
-        $paths[] = $this->getPath() . '/*';
98
+        $paths[] = $this->getPath().'/*';
99 99
 
100 100
         if ($this->config('scan.enabled')) {
101 101
             $paths = array_merge($paths, $this->config('scan.paths'));
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $modules = [];
157 157
 
158 158
         foreach ($cached as $name => $module) {
159
-            $path = $this->config('paths.modules') . '/' . $name;
159
+            $path = $this->config('paths.modules').'/'.$name;
160 160
 
161 161
             $modules[$name] = new Module($this->app, $name, $path);
162 162
         }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function getCached()
173 173
     {
174
-        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
174
+        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
175 175
             return $this->toCollection()->toArray();
176 176
         });
177 177
     }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $modules = $this->enabled();
261 261
 
262
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
262
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
263 263
             if ($a->order == $b->order) {
264 264
                 return 0;
265 265
             }
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
     public function getModulePath($module)
371 371
     {
372 372
         try {
373
-            return $this->findOrFail($module)->getPath() . '/';
373
+            return $this->findOrFail($module)->getPath().'/';
374 374
         } catch (ModuleNotFoundException $e) {
375
-            return $this->getPath() . '/' . Str::studly($module) . '/';
375
+            return $this->getPath().'/'.Str::studly($module).'/';
376 376
         }
377 377
     }
378 378
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
      */
386 386
     public function assetPath($module)
387 387
     {
388
-        return $this->config('paths.assets') . '/' . $module;
388
+        return $this->config('paths.assets').'/'.$module;
389 389
     }
390 390
 
391 391
     /**
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      */
399 399
     public function config($key, $default = null)
400 400
     {
401
-        return $this->app['config']->get('modules.' . $key, $default);
401
+        return $this->app['config']->get('modules.'.$key, $default);
402 402
     }
403 403
 
404 404
     /**
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $this->app['files']->makeDirectory($path, 0777, true);
413 413
         }
414 414
 
415
-        return $path . '/modules.used';
415
+        return $path.'/modules.used';
416 416
     }
417 417
 
418 418
     /**
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
     {
481 481
         list($name, $url) = explode(':', $asset);
482 482
 
483
-        $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
483
+        $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
484 484
 
485
-        $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url);
485
+        $url = $this->app['url']->asset($baseUrl."/{$name}/".$url);
486 486
 
487 487
         return str_replace(['http://', 'https://'], '//', $url);
488 488
     }
Please login to merge, or discard this patch.
src/Migrations/Migrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getMigrations($reverse = false)
85 85
     {
86
-        $files = $this->laravel['files']->glob($this->getPath() . '/*_*.php');
86
+        $files = $this->laravel['files']->glob($this->getPath().'/*_*.php');
87 87
 
88 88
         // Once we have the array of files in the directory we will just remove the
89 89
         // extension and take the basename of the file which is all we need when
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             return array();
93 93
         }
94 94
 
95
-        $files = array_map(function ($file) {
95
+        $files = array_map(function($file) {
96 96
             return str_replace('.php', '', basename($file));
97 97
 
98 98
         }, $files);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $path = $this->getPath();
212 212
         foreach ($files as $file) {
213
-            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
213
+            $this->laravel['files']->requireOnce($path.'/'.$file.'.php');
214 214
         }
215 215
     }
216 216
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
         $result = $query->orderBy('migration', 'desc')->get();
291 291
 
292
-        return collect($result)->map(function ($item) {
292
+        return collect($result)->map(function($item) {
293 293
             return (array) $item;
294 294
         })->pluck('migration');
295 295
     }
Please login to merge, or discard this patch.