Completed
Pull Request — master (#119)
by Micheal
05:24
created
src/Commands/SeedMakeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $seederPath = $this->laravel['modules']->config('paths.generator.seeder');
83 83
 
84
-        return $path . $seederPath . '/' . $this->getSeederName() . '.php';
84
+        return $path.$seederPath.'/'.$this->getSeederName().'.php';
85 85
     }
86 86
 
87 87
     /**
@@ -93,6 +93,6 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder';
95 95
 
96
-        return Str::studly($this->argument('name')) . $end;
96
+        return Str::studly($this->argument('name')).$end;
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
src/Commands/GenerateMiddlewareCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $seederPath = $this->laravel['modules']->config('paths.generator.filter');
74 74
 
75
-        return $path . $seederPath . '/' . $this->getFileName() . '.php';
75
+        return $path.$seederPath.'/'.$this->getFileName().'.php';
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
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.
src/Module.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $lowerName = $this->getLowerName();
161 161
 
162
-        $langPath = $this->getPath() . "/Resources/lang";
162
+        $langPath = $this->getPath()."/Resources/lang";
163 163
 
164 164
         if (is_dir($langPath)) {
165 165
             $this->loadTranslationsFrom($langPath, $lowerName);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $file = 'module.json';
178 178
         }
179 179
 
180
-        return new Json($this->getPath() . '/' . $file, $this->app['files']);
180
+        return new Json($this->getPath().'/'.$file, $this->app['files']);
181 181
     }
182 182
 
183 183
     /**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
      */
228 228
     protected function fireEvent($event)
229 229
     {
230
-        $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
230
+        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
231 231
     }
232 232
 
233 233
     /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     protected function registerFiles()
258 258
     {
259 259
         foreach ($this->get('files', []) as $file) {
260
-            include $this->path . '/' . $file;
260
+            include $this->path.'/'.$file;
261 261
         }
262 262
     }
263 263
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
      */
381 381
     public function getExtraPath($path)
382 382
     {
383
-        return $this->getPath() . '/' . $path;
383
+        return $this->getPath().'/'.$path;
384 384
     }
385 385
 
386 386
     /**
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     public function generateFolders()
272 272
     {
273 273
         foreach ($this->getFolders() as $folder) {
274
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder;
274
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder;
275 275
 
276 276
             $this->filesystem->makeDirectory($path, 0755, true);
277 277
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function generateGitKeep($path)
288 288
     {
289
-        $this->filesystem->put($path . '/.gitkeep', '');
289
+        $this->filesystem->put($path.'/.gitkeep', '');
290 290
     }
291 291
 
292 292
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     public function generateFiles()
296 296
     {
297 297
         foreach ($this->getFiles() as $stub => $file) {
298
-            $path = $this->module->getModulePath($this->getName()) . $file;
298
+            $path = $this->module->getModulePath($this->getName()).$file;
299 299
 
300 300
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
301 301
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
         ]);
320 320
 
321 321
         $this->console->call('module:make-provider', [
322
-            'name' => $this->getName() . 'ServiceProvider',
322
+            'name' => $this->getName().'ServiceProvider',
323 323
             'module' => $this->getName(),
324 324
             '--master' => true,
325 325
         ]);
326 326
 
327 327
         $this->console->call('module:make-controller', [
328
-            'controller' => $this->getName() . 'Controller',
328
+            'controller' => $this->getName().'Controller',
329 329
             'module' => $this->getName(),
330 330
         ]);
331 331
     }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     protected function getStubContents($stub)
341 341
     {
342 342
         return (new Stub(
343
-            '/' . $stub . '.stub',
343
+            '/'.$stub.'.stub',
344 344
             $this->getReplacement($stub))
345 345
         )->render();
346 346
     }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $replaces = [];
374 374
 
375 375
         foreach ($keys as $key) {
376
-            if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) {
376
+            if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) {
377 377
                 $replaces[$key] = call_user_func([$this, $method]);
378 378
             } else {
379 379
                 $replaces[$key] = null;
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
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function getMigrations($reverse = false)
53 53
     {
54
-        $files = $this->laravel['files']->glob($this->getPath() . '/*_*.php');
54
+        $files = $this->laravel['files']->glob($this->getPath().'/*_*.php');
55 55
 
56 56
         // Once we have the array of files in the directory we will just remove the
57 57
         // extension and take the basename of the file which is all we need when
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             return array();
61 61
         }
62 62
 
63
-        $files = array_map(function ($file) {
63
+        $files = array_map(function($file) {
64 64
             return str_replace('.php', '', basename($file));
65 65
 
66 66
         }, $files);
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $path = $this->getPath();
180 180
 
181 181
         foreach ($files as $file) {
182
-            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
182
+            $this->laravel['files']->requireOnce($path.'/'.$file.'.php');
183 183
         }
184 184
     }
185 185
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
         $result = $query->orderBy('migration', 'desc')->get();
261 261
 
262
-        return collect($result)->map(function ($item) {
262
+        return collect($result)->map(function($item) {
263 263
             return (array) $item;
264 264
         })->lists('migration');
265 265
     }
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.