Completed
Push — master ( 7a8b50...2c95a1 )
by Nicolas
02:29
created
src/Module.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @param Container $app
44 44
      * @param $name
45
-     * @param $path
45
+     * @param string $path
46 46
      */
47 47
     public function __construct(Container $app, $name, $path)
48 48
     {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     /**
228 228
      * Get a specific data from composer.json file by given the key.
229 229
      *
230
-     * @param $key
230
+     * @param string $key
231 231
      * @param null $default
232 232
      *
233 233
      * @return mixed
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     /**
301 301
      * Determine whether the given status same with the current module status.
302 302
      *
303
-     * @param $status
303
+     * @param integer $status
304 304
      *
305 305
      * @return bool
306 306
      */
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
     /**
355 355
      * Set active state for current module.
356 356
      *
357
-     * @param $active
357
+     * @param integer $active
358 358
      *
359
-     * @return bool
359
+     * @return integer
360 360
      */
361 361
     public function setActive($active)
362 362
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $lowerName = $this->getLowerName();
188 188
 
189
-        $langPath = $this->getPath() . '/Resources/lang';
189
+        $langPath = $this->getPath().'/Resources/lang';
190 190
 
191 191
         if (is_dir($langPath)) {
192 192
             $this->loadTranslationsFrom($langPath, $lowerName);
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
             $file = 'module.json';
207 207
         }
208 208
 
209
-        return array_get($this->moduleJson, $file, function () use ($file) {
210
-            return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']);
209
+        return array_get($this->moduleJson, $file, function() use ($file) {
210
+            return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']);
211 211
         });
212 212
     }
213 213
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     protected function fireEvent($event)
260 260
     {
261
-        $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
261
+        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
262 262
     }
263 263
     /**
264 264
      * Register the aliases from this module.
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     protected function registerFiles()
284 284
     {
285 285
         foreach ($this->get('files', []) as $file) {
286
-            include $this->path . '/' . $file;
286
+            include $this->path.'/'.$file;
287 287
         }
288 288
     }
289 289
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     public function getExtraPath(string $path) : string
408 408
     {
409
-        return $this->getPath() . '/' . $path;
409
+        return $this->getPath().'/'.$path;
410 410
     }
411 411
 
412 412
     /**
Please login to merge, or discard this patch.
src/Repository.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     /**
378 378
      * Get module path for a specific module.
379 379
      *
380
-     * @param $module
380
+     * @param string $module
381 381
      *
382 382
      * @return string
383 383
      */
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     /**
406 406
      * Get a specific config data from a configuration file.
407 407
      *
408
-     * @param $key
408
+     * @param string $key
409 409
      *
410 410
      * @param null $default
411 411
      * @return mixed
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
     /**
608 608
      * Get stub path.
609 609
      *
610
-     * @return string|null
610
+     * @return string|boolean
611 611
      */
612 612
     public function getStubPath()
613 613
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $paths = $this->paths;
102 102
 
103
-        $paths[] = $this->getPath() . '/*';
103
+        $paths[] = $this->getPath().'/*';
104 104
 
105 105
         if ($this->config('scan.enabled')) {
106 106
             $paths = array_merge($paths, $this->config('scan.paths'));
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function getCached()
148 148
     {
149
-        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
149
+        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
150 150
             return $this->toCollection()->toArray();
151 151
         });
152 152
     }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $modules = $this->enabled();
236 236
 
237
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
237
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
238 238
             if ($a->order == $b->order) {
239 239
                 return 0;
240 240
             }
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
     public function getModulePath($module)
385 385
     {
386 386
         try {
387
-            return $this->findOrFail($module)->getPath() . '/';
387
+            return $this->findOrFail($module)->getPath().'/';
388 388
         } catch (ModuleNotFoundException $e) {
389
-            return $this->getPath() . '/' . Str::studly($module) . '/';
389
+            return $this->getPath().'/'.Str::studly($module).'/';
390 390
         }
391 391
     }
392 392
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      */
400 400
     public function assetPath($module) : string
401 401
     {
402
-        return $this->config('paths.assets') . '/' . $module;
402
+        return $this->config('paths.assets').'/'.$module;
403 403
     }
404 404
 
405 405
     /**
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      */
413 413
     public function config($key, $default = null)
414 414
     {
415
-        return $this->app['config']->get('modules.' . $key, $default);
415
+        return $this->app['config']->get('modules.'.$key, $default);
416 416
     }
417 417
 
418 418
     /**
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
         }
514 514
         list($name, $url) = explode(':', $asset);
515 515
 
516
-        $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
516
+        $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
517 517
 
518
-        $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url);
518
+        $url = $this->app['url']->asset($baseUrl."/{$name}/".$url);
519 519
 
520 520
         return str_replace(['http://', 'https://'], '//', $url);
521 521
     }
Please login to merge, or discard this patch.