Completed
Pull Request — master (#166)
by Josh
12:20
created
src/Commands/GenerateEventCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
         $module = $this->laravel['modules']->findOrFail($this->getModuleName());
58 58
 
59 59
         return (new Stub('/event.stub', [
60
-            'NAMESPACE' => $this->getClassNamespace($module) . "\\" . config('modules.paths.generator.event'),
60
+            'NAMESPACE' => $this->getClassNamespace($module)."\\".config('modules.paths.generator.event'),
61 61
             "CLASS" => $this->getClass(),
62
-            'DUMMYNAMESPACE' => $this->laravel->getNamespace() . 'Events',
62
+            'DUMMYNAMESPACE' => $this->laravel->getNamespace().'Events',
63 63
         ]))->render();
64 64
     }
65 65
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $path = $this->laravel['modules']->getModulePath($this->getModuleName());
69 69
         $seederPath = $this->laravel['modules']->config('paths.generator.event');
70 70
 
71
-        return $path . $seederPath . '/' . $this->getFileName() . '.php';
71
+        return $path.$seederPath.'/'.$this->getFileName().'.php';
72 72
     }
73 73
 
74 74
     /**
Please login to merge, or discard this patch.
src/Commands/MigrationCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         $generatorPath = $this->laravel['modules']->config('paths.generator.migration');
115 115
 
116
-        return $path . $generatorPath . '/' . $this->getFileName() . '.php';
116
+        return $path.$generatorPath.'/'.$this->getFileName().'.php';
117 117
     }
118 118
 
119 119
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function getFileName()
123 123
     {
124
-        return date('Y_m_d_His_') . $this->getSchemaName();
124
+        return date('Y_m_d_His_').$this->getSchemaName();
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * @throws \InvalidArgumentException
69 69
      *
70
-     * @return mixed
70
+     * @return Stub
71 71
      */
72 72
     protected function getTemplateContents()
73 73
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     }
108 108
 
109 109
     /**
110
-     * @return mixed
110
+     * @return string
111 111
      */
112 112
     protected function getDestinationFilePath()
113 113
     {
Please login to merge, or discard this patch.
src/Commands/SeedMakeCommand.php 2 patches
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.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return mixed
62
+     * @return string
63 63
      */
64 64
     protected function getTemplateContents()
65 65
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-     * @return mixed
76
+     * @return string
77 77
      */
78 78
     protected function getDestinationFilePath()
79 79
     {
Please login to merge, or discard this patch.
src/Commands/GenerateMiddlewareCommand.php 2 patches
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.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return mixed
62
+     * @return string
63 63
      */
64 64
     protected function getTemplateContents()
65 65
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-     * @return mixed
76
+     * @return string
77 77
      */
78 78
     protected function getDestinationFilePath()
79 79
     {
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 2 patches
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.
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @param Application $app
37 37
      * @param $name
38
-     * @param $path
38
+     * @param string $path
39 39
      */
40 40
     public function __construct(Application $app, $name, $path)
41 41
     {
@@ -169,6 +169,7 @@  discard block
 block discarded – undo
169 169
     /**
170 170
      * Get json contents.
171 171
      *
172
+     * @param string $file
172 173
      * @return Json
173 174
      */
174 175
     public function json($file = null)
@@ -196,7 +197,7 @@  discard block
 block discarded – undo
196 197
     /**
197 198
      * Get a specific data from composer.json file by given the key.
198 199
      *
199
-     * @param $key
200
+     * @param string $key
200 201
      * @param null $default
201 202
      *
202 203
      * @return mixed
@@ -274,7 +275,7 @@  discard block
 block discarded – undo
274 275
     /**
275 276
      * Determine whether the given status same with the current module status.
276 277
      *
277
-     * @param $status
278
+     * @param integer $status
278 279
      *
279 280
      * @return bool
280 281
      */
@@ -326,9 +327,9 @@  discard block
 block discarded – undo
326 327
     /**
327 328
      * Set active state for current module.
328 329
      *
329
-     * @param $active
330
+     * @param integer $active
330 331
      *
331
-     * @return bool
332
+     * @return integer
332 333
      */
333 334
     public function setActive($active)
334 335
     {
@@ -338,7 +339,7 @@  discard block
 block discarded – undo
338 339
     /**
339 340
      * Disable the current module.
340 341
      *
341
-     * @return bool
342
+     * @return boolean|null
342 343
      */
343 344
     public function disable()
344 345
     {
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.