Completed
Pull Request — master (#348)
by Martin
03:05
created
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('module_path')) {
3
+if (!function_exists('module_path')) {
4 4
     function module_path($name)
5 5
     {
6 6
         $module = app('modules')->find($name);
Please login to merge, or discard this patch.
src/Module.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     {
178 178
         $lowerName = $this->getLowerName();
179 179
 
180
-        $langPath = $this->getPath() . "/Resources/lang";
180
+        $langPath = $this->getPath()."/Resources/lang";
181 181
 
182 182
         if (is_dir($langPath)) {
183 183
             $this->loadTranslationsFrom($langPath, $lowerName);
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
             $file = 'module.json';
198 198
         }
199 199
 
200
-        return array_get($this->moduleJson, $file, function () use ($file) {
201
-            return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']);
200
+        return array_get($this->moduleJson, $file, function() use ($file) {
201
+            return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']);
202 202
         });
203 203
     }
204 204
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     protected function fireEvent($event)
251 251
     {
252
-        $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
252
+        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
253 253
     }
254 254
 
255 255
     /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     protected function registerFiles()
280 280
     {
281 281
         foreach ($this->get('files', []) as $file) {
282
-            include $this->path . '/' . $file;
282
+            include $this->path.'/'.$file;
283 283
         }
284 284
     }
285 285
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
      */
401 401
     public function getExtraPath($path)
402 402
     {
403
-        return $this->getPath() . '/' . $path;
403
+        return $this->getPath().'/'.$path;
404 404
     }
405 405
 
406 406
     /**
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param Container $app
46 46
      * @param $name
47
-     * @param $path
47
+     * @param string $path
48 48
      */
49 49
     public function __construct(Container $app, $name, $path)
50 50
     {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     /**
189 189
      * Get json contents from the cache, setting as needed.
190 190
      *
191
-     * @param $file
191
+     * @param string $file
192 192
      *
193 193
      * @return Json
194 194
      */
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     /**
220 220
      * Get a specific data from composer.json file by given the key.
221 221
      *
222
-     * @param $key
222
+     * @param string $key
223 223
      * @param null $default
224 224
      *
225 225
      * @return mixed
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * Determine whether the given status same with the current module status.
299 299
      *
300
-     * @param $status
300
+     * @param integer $status
301 301
      *
302 302
      * @return bool
303 303
      */
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
     /**
350 350
      * Set active state for current module.
351 351
      *
352
-     * @param $active
352
+     * @param integer $active
353 353
      *
354
-     * @return bool
354
+     * @return integer
355 355
      */
356 356
     public function setActive($active)
357 357
     {
Please login to merge, or discard this patch.
src/Laravel/Repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $modules = [];
40 40
 
41 41
         foreach ($cached as $name => $module) {
42
-            $path = $this->config('paths.modules') . '/' . $name;
42
+            $path = $this->config('paths.modules').'/'.$name;
43 43
 
44 44
             $modules[$name] = new Module($this->app, $name, $path);
45 45
         }
Please login to merge, or discard this patch.
src/Laravel/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function getCachedServicesPath()
16 16
     {
17
-        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath());
17
+        return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath());
18 18
     }
19 19
 
20 20
     /**
Please login to merge, or discard this patch.
src/Lumen/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function getCachedServicesPath()
14 14
     {
15
-        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php');
15
+        return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->basePath('storage/app/').'services.php');
16 16
     }
17 17
 
18 18
     /**
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function setupStubPath()
32 32
     {
33
-        Stub::setBasePath(__DIR__ . '/Commands/stubs');
33
+        Stub::setBasePath(__DIR__.'/Commands/stubs');
34 34
 
35
-        $this->app->booted(function ($app) {
35
+        $this->app->booted(function($app) {
36 36
             if ($app['modules']->config('stubs.enabled') === true) {
37 37
                 Stub::setBasePath($app['modules']->config('stubs.path'));
38 38
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected function registerServices()
46 46
     {
47
-        $this->app->singleton('modules', function ($app) {
47
+        $this->app->singleton('modules', function($app) {
48 48
             $path = $app['config']->get('modules.paths.modules');
49 49
 
50 50
             return new \Nwidart\Modules\Laravel\Repository($app, $path);
Please login to merge, or discard this patch.
src/LumenModulesServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function setupStubPath()
32 32
     {
33
-        Stub::setBasePath(__DIR__ . '/Commands/stubs');
33
+        Stub::setBasePath(__DIR__.'/Commands/stubs');
34 34
 
35 35
         if (app('modules')->config('stubs.enabled') === true) {
36 36
             Stub::setBasePath(app('modules')->config('stubs.path'));
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     protected function registerServices()
44 44
     {
45
-        $this->app->singleton('modules', function ($app) {
45
+        $this->app->singleton('modules', function($app) {
46 46
             $path = $app['config']->get('modules.paths.modules');
47 47
 
48 48
             return new \Nwidart\Modules\Lumen\Repository($app, $path);
Please login to merge, or discard this patch.
src/ModulesServiceProvider.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
     protected function registerNamespaces()
45 45
     {
46
-        $configPath = __DIR__ . '/../config/config.php';
46
+        $configPath = __DIR__.'/../config/config.php';
47 47
 
48 48
         $this->mergeConfigFrom($configPath, 'modules');
49 49
         $this->publishes([
Please login to merge, or discard this patch.
src/Lumen/Repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $modules = [];
40 40
 
41 41
         foreach ($cached as $name => $module) {
42
-            $path = $this->config('paths.modules') . '/' . $name;
42
+            $path = $this->config('paths.modules').'/'.$name;
43 43
 
44 44
             $modules[$name] = new Module($this->app, $name, $path);
45 45
         }
Please login to merge, or discard this patch.