Completed
Push — master ( 548b63...b72f00 )
by Nicolas
11s
created
src/Commands/ModelMakeCommand.php 2 patches
Doc Comments   +3 added lines, -3 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
     {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     /**
81
-     * @return mixed
81
+     * @return string
82 82
      */
83 83
     protected function getDestinationFilePath()
84 84
     {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     /**
93
-     * @return mixed|string
93
+     * @return string
94 94
      */
95 95
     private function getModelName()
96 96
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 
54 54
         $string = '';
55 55
         foreach ($pieces as $i => $piece) {
56
-            if ($i+1 < count($pieces)) {
57
-                $string .= strtolower($piece) . '_';
56
+            if ($i + 1 < count($pieces)) {
57
+                $string .= strtolower($piece).'_';
58 58
             } else {
59 59
                 $string .= Str::plural(strtolower($piece));
60 60
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     private function handleOptionalMigrationOption()
96 96
     {
97 97
         if ($this->option('migration') === true) {
98
-            $migrationName = 'create_' . $this->createMigrationName() . '_table';
98
+            $migrationName = 'create_'.$this->createMigrationName().'_table';
99 99
             $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]);
100 100
         }
101 101
     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         $modelPath = GenerateConfigReader::read('model');
130 130
 
131
-        return $path . $modelPath->getPath() . '/' . $this->getModelName() . '.php';
131
+        return $path.$modelPath->getPath().'/'.$this->getModelName().'.php';
132 132
     }
133 133
 
134 134
     /**
Please login to merge, or discard this patch.
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/Commands/ResourceMakeCommand.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
         $resourcePath = GenerateConfigReader::read('resource');
71 71
 
72
-        return $path . $resourcePath->getPath() . '/' . $this->getFileName() . '.php';
72
+        return $path.$resourcePath->getPath().'/'.$this->getFileName().'.php';
73 73
     }
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
src/Commands/TestMakeCommand.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         $testPath = GenerateConfigReader::read('test');
63 63
 
64
-        return $path . $testPath->getPath() . '/' . $this->getFileName() . '.php';
64
+        return $path.$testPath->getPath().'/'.$this->getFileName().'.php';
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
src/Repository.php 2 patches
Doc Comments   +4 added lines, -4 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,9 +405,9 @@  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
-     * @param null $default
410
+     * @param string $default
411 411
      * @return mixed
412 412
      */
413 413
     public function config($key, $default = null)
@@ -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
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         if ($this->config('scan.enabled')) {
106 106
             $paths = array_merge($paths, $this->config('scan.paths'));
107 107
         }
108
-        $paths = array_map(function ($path) {
108
+        $paths = array_map(function($path) {
109 109
             return str_finish($path, '/*');
110 110
         }, $paths);
111 111
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function getCached()
151 151
     {
152
-        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
152
+        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
153 153
             return $this->toCollection()->toArray();
154 154
         });
155 155
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     {
238 238
         $modules = $this->enabled();
239 239
 
240
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
240
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
241 241
             if ($a->order == $b->order) {
242 242
                 return 0;
243 243
             }
@@ -387,9 +387,9 @@  discard block
 block discarded – undo
387 387
     public function getModulePath($module)
388 388
     {
389 389
         try {
390
-            return $this->findOrFail($module)->getPath() . '/';
390
+            return $this->findOrFail($module)->getPath().'/';
391 391
         } catch (ModuleNotFoundException $e) {
392
-            return $this->getPath() . '/' . Str::studly($module) . '/';
392
+            return $this->getPath().'/'.Str::studly($module).'/';
393 393
         }
394 394
     }
395 395
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
      */
403 403
     public function assetPath($module) : string
404 404
     {
405
-        return $this->config('paths.assets') . '/' . $module;
405
+        return $this->config('paths.assets').'/'.$module;
406 406
     }
407 407
 
408 408
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public function config($key, $default = null)
417 417
     {
418
-        return $this->app['config']->get('modules.' . $key, $default);
418
+        return $this->app['config']->get('modules.'.$key, $default);
419 419
     }
420 420
 
421 421
     /**
@@ -516,9 +516,9 @@  discard block
 block discarded – undo
516 516
         }
517 517
         list($name, $url) = explode(':', $asset);
518 518
 
519
-        $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
519
+        $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
520 520
 
521
-        $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url);
521
+        $url = $this->app['url']->asset($baseUrl."/{$name}/".$url);
522 522
 
523 523
         return str_replace(['http://', 'https://'], '//', $url);
524 524
     }
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 continue;
284 284
             }
285 285
 
286
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath();
286
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath();
287 287
 
288 288
             $this->filesystem->makeDirectory($path, 0755, true);
289 289
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function generateGitKeep($path)
300 300
     {
301
-        $this->filesystem->put($path . '/.gitkeep', '');
301
+        $this->filesystem->put($path.'/.gitkeep', '');
302 302
     }
303 303
 
304 304
     /**
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     public function generateFiles()
308 308
     {
309 309
         foreach ($this->getFiles() as $stub => $file) {
310
-            $path = $this->module->getModulePath($this->getName()) . $file;
310
+            $path = $this->module->getModulePath($this->getName()).$file;
311 311
 
312 312
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
313 313
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -331,13 +331,13 @@  discard block
 block discarded – undo
331 331
         ]);
332 332
 
333 333
         $this->console->call('module:make-provider', [
334
-            'name' => $this->getName() . 'ServiceProvider',
334
+            'name' => $this->getName().'ServiceProvider',
335 335
             'module' => $this->getName(),
336 336
             '--master' => true,
337 337
         ]);
338 338
 
339 339
         $this->console->call('module:make-controller', [
340
-            'controller' => $this->getName() . 'Controller',
340
+            'controller' => $this->getName().'Controller',
341 341
             'module' => $this->getName(),
342 342
         ]);
343 343
     }
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     protected function getStubContents($stub)
353 353
     {
354 354
         return (new Stub(
355
-            '/' . $stub . '.stub',
355
+            '/'.$stub.'.stub',
356 356
             $this->getReplacement($stub)
357 357
         )
358 358
         )->render();
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $replaces = [];
387 387
 
388 388
         foreach ($keys as $key) {
389
-            if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) {
389
+            if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) {
390 390
                 $replaces[$key] = $this->$method();
391 391
             } else {
392 392
                 $replaces[$key] = null;
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
      */
402 402
     private function generateModuleJsonFile()
403 403
     {
404
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
404
+        $path = $this->module->getModulePath($this->getName()).'module.json';
405 405
 
406 406
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
407 407
             $this->filesystem->makeDirectory($dir, 0775, true);
@@ -418,13 +418,13 @@  discard block
 block discarded – undo
418 418
      */
419 419
     private function cleanModuleJsonFile()
420 420
     {
421
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
421
+        $path = $this->module->getModulePath($this->getName()).'module.json';
422 422
 
423 423
         $content = $this->filesystem->get($path);
424 424
         $namespace = $this->getModuleNamespaceReplacement();
425 425
         $studlyName = $this->getStudlyNameReplacement();
426 426
 
427
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
427
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
428 428
 
429 429
         $content = str_replace($provider, '', $content);
430 430
 
@@ -493,6 +493,6 @@  discard block
 block discarded – undo
493 493
 
494 494
     protected function getRoutesLocationReplacement()
495 495
     {
496
-        return '/' . $this->module->config('stubs.files.routes');
496
+        return '/'.$this->module->config('stubs.files.routes');
497 497
     }
498 498
 }
Please login to merge, or discard this patch.
src/Commands/ControllerMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $controllerPath = GenerateConfigReader::read('controller');
46 46
 
47
-        return $path . $controllerPath->getPath() . '/' . $this->getControllerName() . '.php';
47
+        return $path.$controllerPath->getPath().'/'.$this->getControllerName().'.php';
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
src/Commands/JobMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
         $jobPath = GenerateConfigReader::read('jobs');
89 89
 
90
-        return $path . $jobPath->getPath() . '/' . $this->getFileName() . '.php';
90
+        return $path.$jobPath->getPath().'/'.$this->getFileName().'.php';
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
src/Commands/NotificationMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         $notificationPath = GenerateConfigReader::read('notifications');
63 63
 
64
-        return $path . $notificationPath->getPath() . '/' . $this->getFileName() . '.php';
64
+        return $path.$notificationPath->getPath().'/'.$this->getFileName().'.php';
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.