Completed
Pull Request — master (#119)
by Micheal
05:24
created
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.
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.
src/Commands/MigrateRollbackCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         }
43 43
 
44 44
         foreach (array_reverse($this->laravel['modules']->all()) as $module) {
45
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
45
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
46 46
 
47 47
             $this->reset($module);
48 48
         }
Please login to merge, or discard this patch.
src/Commands/MigrateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         }
43 43
 
44 44
         foreach (array_reverse($this->laravel['modules']->all()) as $module) {
45
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
45
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
46 46
 
47 47
             $this->reset($module);
48 48
         }
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/Migrations/NameParser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     /**
108 108
      * Get the services provided by the provider.
109 109
      *
110
-     * @return array
110
+     * @return string[]
111 111
      */
112 112
     public function provides()
113 113
     {
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.