Completed
Push — master ( eb3a14...ff6e8c )
by Nicolas
03:49
created
src/Generators/ModuleGenerator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@
 block discarded – undo
335 335
      *
336 336
      * @param $stub
337 337
      *
338
-     * @return Stub
338
+     * @return string
339 339
      */
340 340
     protected function getStubContents($stub)
341 341
     {
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function setupStubPath()
57 57
     {
58
-        $this->app->booted(function ($app) {
58
+        $this->app->booted(function($app) {
59 59
             Stub::setBasePath(__DIR__.'/Commands/stubs');
60 60
 
61 61
             if ($app['modules']->config('stubs.enabled') === true) {
@@ -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/Migrations/Migrator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@
 block discarded – undo
248 248
      *
249 249
      * @param array $migrations
250 250
      *
251
-     * @return array
251
+     * @return \Illuminate\Support\Collection
252 252
      */
253 253
     public function getLast($migrations)
254 254
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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);
@@ -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.
src/Module.php 2 patches
Doc Comments   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      * The constructor.
35 35
      *
36 36
      * @param Application $app
37
-     * @param $name
38
-     * @param $path
37
+     * @param string $name
38
+     * @param string $path
39 39
      */
40 40
     public function __construct(Application $app, $name, $path)
41 41
     {
@@ -167,6 +167,7 @@  discard block
 block discarded – undo
167 167
     /**
168 168
      * Get json contents.
169 169
      *
170
+     * @param string $file
170 171
      * @return Json
171 172
      */
172 173
     public function json($file = null)
@@ -194,7 +195,7 @@  discard block
 block discarded – undo
194 195
     /**
195 196
      * Get a specific data from composer.json file by given the key.
196 197
      *
197
-     * @param $key
198
+     * @param string $key
198 199
      * @param null $default
199 200
      *
200 201
      * @return mixed
@@ -272,7 +273,7 @@  discard block
 block discarded – undo
272 273
     /**
273 274
      * Determine whether the given status same with the current module status.
274 275
      *
275
-     * @param $status
276
+     * @param integer $status
276 277
      *
277 278
      * @return bool
278 279
      */
@@ -324,9 +325,9 @@  discard block
 block discarded – undo
324 325
     /**
325 326
      * Set active state for current module.
326 327
      *
327
-     * @param $active
328
+     * @param integer $active
328 329
      *
329
-     * @return bool
330
+     * @return integer
330 331
      */
331 332
     public function setActive($active)
332 333
     {
@@ -336,7 +337,7 @@  discard block
 block discarded – undo
336 337
     /**
337 338
      * Disable the current module.
338 339
      *
339
-     * @return bool
340
+     * @return boolean|null
340 341
      */
341 342
     public function disable()
342 343
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
             $file = 'module.json';
176 176
         }
177 177
 
178
-        return new Json($this->getPath() . '/' . $file, $this->app['files']);
178
+        return new Json($this->getPath().'/'.$file, $this->app['files']);
179 179
     }
180 180
 
181 181
     /**
Please login to merge, or discard this patch.
src/Publishing/Publisher.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     /**
89 89
      * Get module instance.
90 90
      *
91
-     * @return \Nwidart\Modules\Module
91
+     * @return string
92 92
      */
93 93
     public function getModule()
94 94
     {
Please login to merge, or discard this patch.
src/Repository.php 2 patches
Doc Comments   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * Get scanned modules paths.
91 91
      *
92
-     * @return array
92
+     * @return string[]
93 93
      */
94 94
     public function getScanPaths()
95 95
     {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     /**
366 366
      * Get module path for a specific module.
367 367
      *
368
-     * @param $module
368
+     * @param string $module
369 369
      *
370 370
      * @return string
371 371
      */
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     /**
394 394
      * Get a specific config data from a configuration file.
395 395
      *
396
-     * @param $key
396
+     * @param string $key
397 397
      *
398 398
      * @return mixed
399 399
      */
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     /**
434 434
      * Get module used for cli session.
435 435
      *
436
-     * @return string
436
+     * @return Module
437 437
      */
438 438
     public function getUsedNow()
439 439
     {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
     /**
444 444
      * Get used now.
445 445
      *
446
-     * @return string
446
+     * @return Module
447 447
      */
448 448
     public function getUsed()
449 449
     {
@@ -474,7 +474,6 @@  discard block
 block discarded – undo
474 474
      * Get asset url from a specific module.
475 475
      *
476 476
      * @param string $asset
477
-     * @param bool   $secure
478 477
      *
479 478
      * @return string
480 479
      */
@@ -518,7 +517,7 @@  discard block
 block discarded – undo
518 517
      *
519 518
      * @param string $name
520 519
      *
521
-     * @return bool
520
+     * @return boolean|null
522 521
      */
523 522
     public function enable($name)
524 523
     {
@@ -530,7 +529,7 @@  discard block
 block discarded – undo
530 529
      *
531 530
      * @param string $name
532 531
      *
533
-     * @return bool
532
+     * @return boolean|null
534 533
      */
535 534
     public function disable($name)
536 535
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getCached()
177 177
     {
178
-        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
178
+        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
179 179
             return $this->toCollection()->toArray();
180 180
         });
181 181
     }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     {
264 264
         $modules = $this->enabled();
265 265
 
266
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
266
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
267 267
             if ($a->order == $b->order) {
268 268
                 return 0;
269 269
             }
Please login to merge, or discard this patch.
src/Collection.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
     public function toArray()
26 26
     {
27
-        return array_map(function ($value) {
27
+        return array_map(function($value) {
28 28
             if ($value instanceof Module) {
29 29
                 return $value->json()->getAttributes();
30 30
             }
Please login to merge, or discard this patch.
src/Process/Installer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 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
         }
Please login to merge, or discard this patch.
src/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
             return json_decode($this->getContents(), 1);
123 123
         }
124 124
 
125
-        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () {
125
+        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function() {
126 126
             return json_decode($this->getContents(), 1);
127 127
         });
128 128
     }
Please login to merge, or discard this patch.