Completed
Pull Request — master (#272)
by
unknown
02:55
created
src/Generators/ModuleGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     public function generateFolders()
277 277
     {
278 278
         foreach ($this->getFolders() as $folder) {
279
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder;
279
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder;
280 280
 
281 281
             $this->filesystem->makeDirectory($path, 0755, true);
282 282
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function generateGitKeep($path)
293 293
     {
294
-        $this->filesystem->put($path . '/.gitkeep', '');
294
+        $this->filesystem->put($path.'/.gitkeep', '');
295 295
     }
296 296
 
297 297
     /**
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     public function generateFiles()
301 301
     {
302 302
         foreach ($this->getFiles() as $stub => $file) {
303
-            $path = $this->module->getModulePath($this->getName()) . $file;
303
+            $path = $this->module->getModulePath($this->getName()).$file;
304 304
 
305 305
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
306 306
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
         ]);
325 325
 
326 326
         $this->console->call('module:make-provider', [
327
-            'name' => $this->getName() . 'ServiceProvider',
327
+            'name' => $this->getName().'ServiceProvider',
328 328
             'module' => $this->getName(),
329 329
             '--master' => true,
330 330
         ]);
331 331
 
332 332
         $this->console->call('module:make-controller', [
333
-            'controller' => $this->getName() . 'Controller',
333
+            'controller' => $this->getName().'Controller',
334 334
             'module' => $this->getName(),
335 335
         ]);
336 336
     }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     protected function getStubContents($stub)
346 346
     {
347 347
         return (new Stub(
348
-            '/' . $stub . '.stub',
348
+            '/'.$stub.'.stub',
349 349
             $this->getReplacement($stub))
350 350
         )->render();
351 351
     }
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
         $replaces = [];
379 379
 
380 380
         foreach ($keys as $key) {
381
-            if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) {
381
+            if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) {
382 382
                 $replaces[$key] = call_user_func([$this, $method]);
383 383
             } else {
384 384
                 $replaces[$key] = null;
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      */
394 394
     private function generateModuleJsonFile()
395 395
     {
396
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
396
+        $path = $this->module->getModulePath($this->getName()).'module.json';
397 397
 
398 398
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
399 399
             $this->filesystem->makeDirectory($dir, 0775, true);
@@ -410,13 +410,13 @@  discard block
 block discarded – undo
410 410
      */
411 411
     private function cleanModuleJsonFile()
412 412
     {
413
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
413
+        $path = $this->module->getModulePath($this->getName()).'module.json';
414 414
 
415 415
         $content = $this->filesystem->get($path);
416 416
         $namespace = $this->getModuleNamespaceReplacement();
417 417
         $studlyName = $this->getStudlyNameReplacement();
418 418
 
419
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
419
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
420 420
 
421 421
         $content = str_replace($provider, '', $content);
422 422
 
Please login to merge, or discard this patch.
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
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
             $file = 'module.json';
196 196
         }
197 197
 
198
-        return array_get($this->moduleJson, $file, function () use ($file) {
198
+        return array_get($this->moduleJson, $file, function() use ($file) {
199 199
             return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']);
200 200
         });
201 201
     }
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         Stub::setBasePath(__DIR__.'/Commands/stubs');
35 35
 
36
-        $this->app->booted(function ($app) {
36
+        $this->app->booted(function($app) {
37 37
             if ($app['modules']->config('stubs.enabled') === true) {
38 38
                 Stub::setBasePath($app['modules']->config('stubs.path'));
39 39
             }
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
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     protected function registerServices()
54 54
     {
55
-        $this->app->singleton('modules', function ($app) {
55
+        $this->app->singleton('modules', function($app) {
56 56
             $path = $app['config']->get('modules.paths.modules');
57 57
 
58 58
             return new Repository($app, $path);
Please login to merge, or discard this patch.