Completed
Pull Request — master (#119)
by Micheal
05:24
created
src/Commands/MigrationCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * @throws InvalidMigrationNameException
69 69
      *
70
-     * @return mixed
70
+     * @return Stub
71 71
      */
72 72
     protected function getTemplateContents()
73 73
     {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-     * @return mixed
108
+     * @return string
109 109
      */
110 110
     protected function getDestinationFilePath()
111 111
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         $generatorPath = $this->laravel['modules']->config('paths.generator.migration');
115 115
 
116
-        return $path . $generatorPath . '/' . $this->getFileName() . '.php';
116
+        return $path.$generatorPath.'/'.$this->getFileName().'.php';
117 117
     }
118 118
 
119 119
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function getFileName()
123 123
     {
124
-        return date('Y_m_d_His_') . $this->getSchemaName();
124
+        return date('Y_m_d_His_').$this->getSchemaName();
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.
src/Commands/ModelCommand.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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
         $seederPath = $this->laravel['modules']->config('paths.generator.model');
88 88
 
89
-        return $path . $seederPath . '/' . $this->getModelName() . '.php';
89
+        return $path.$seederPath.'/'.$this->getModelName().'.php';
90 90
     }
91 91
 
92 92
     /**
Please login to merge, or discard this patch.
src/Commands/SeedMakeCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @return mixed
60
+     * @return string
61 61
      */
62 62
     protected function getTemplateContents()
63 63
     {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @return mixed
73
+     * @return string
74 74
      */
75 75
     protected function getDestinationFilePath()
76 76
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $seederPath = $this->laravel['modules']->config('paths.generator.seeder');
83 83
 
84
-        return $path . $seederPath . '/' . $this->getSeederName() . '.php';
84
+        return $path.$seederPath.'/'.$this->getSeederName().'.php';
85 85
     }
86 86
 
87 87
     /**
@@ -93,6 +93,6 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder';
95 95
 
96
-        return Str::studly($this->argument('name')) . $end;
96
+        return Str::studly($this->argument('name')).$end;
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     public function generateFolders()
272 272
     {
273 273
         foreach ($this->getFolders() as $folder) {
274
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder;
274
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder;
275 275
 
276 276
             $this->filesystem->makeDirectory($path, 0755, true);
277 277
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function generateGitKeep($path)
288 288
     {
289
-        $this->filesystem->put($path . '/.gitkeep', '');
289
+        $this->filesystem->put($path.'/.gitkeep', '');
290 290
     }
291 291
 
292 292
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     public function generateFiles()
296 296
     {
297 297
         foreach ($this->getFiles() as $stub => $file) {
298
-            $path = $this->module->getModulePath($this->getName()) . $file;
298
+            $path = $this->module->getModulePath($this->getName()).$file;
299 299
 
300 300
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
301 301
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
         ]);
320 320
 
321 321
         $this->console->call('module:make-provider', [
322
-            'name' => $this->getName() . 'ServiceProvider',
322
+            'name' => $this->getName().'ServiceProvider',
323 323
             'module' => $this->getName(),
324 324
             '--master' => true,
325 325
         ]);
326 326
 
327 327
         $this->console->call('module:make-controller', [
328
-            'controller' => $this->getName() . 'Controller',
328
+            'controller' => $this->getName().'Controller',
329 329
             'module' => $this->getName(),
330 330
         ]);
331 331
     }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     protected function getStubContents($stub)
341 341
     {
342 342
         return (new Stub(
343
-            '/' . $stub . '.stub',
343
+            '/'.$stub.'.stub',
344 344
             $this->getReplacement($stub))
345 345
         )->render();
346 346
     }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $replaces = [];
374 374
 
375 375
         foreach ($keys as $key) {
376
-            if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) {
376
+            if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) {
377 377
                 $replaces[$key] = call_user_func([$this, $method]);
378 378
             } else {
379 379
                 $replaces[$key] = null;
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/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/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.
src/Commands/CommandCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @return mixed
60
+     * @return string
61 61
      */
62 62
     protected function getTemplateContents()
63 63
     {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @return mixed
73
+     * @return string
74 74
      */
75 75
     protected function getDestinationFilePath()
76 76
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $seederPath = $this->laravel['modules']->config('paths.generator.filter');
74 74
 
75
-        return $path . $seederPath . '/' . $this->getFileName() . '.php';
75
+        return $path.$seederPath.'/'.$this->getFileName().'.php';
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
src/Commands/GenerateProviderCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @return mixed
60
+     * @return string
61 61
      */
62 62
     protected function getTemplateContents()
63 63
     {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @return mixed
73
+     * @return string
74 74
      */
75 75
     protected function getDestinationFilePath()
76 76
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         $module = $this->laravel['modules']->findOrFail($this->getModuleName());
69 69
 
70
-        return (new Stub('/' . $stub . '.stub', [
70
+        return (new Stub('/'.$stub.'.stub', [
71 71
             'NAMESPACE'         => $this->getClassNamespace($module),
72 72
             'CLASS'             => $this->getClass(),
73 73
             'LOWER_NAME'        => $module->getLowerName(),
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         $generatorPath = $this->laravel['modules']->config('paths.generator.provider');
92 92
 
93
-        return $path . $generatorPath . '/' . $this->getFileName() . '.php';
93
+        return $path.$generatorPath.'/'.$this->getFileName().'.php';
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.