Completed
Pull Request — master (#354)
by Martin
02:25
created
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
         $string = '';
54 54
         foreach ($pieces as $i => $piece) {
55
-            if ($i+1 < count($pieces)) {
56
-                $string .= strtolower($piece) . '_';
55
+            if ($i + 1 < count($pieces)) {
56
+                $string .= strtolower($piece).'_';
57 57
             } else {
58 58
                 $string .= Str::plural(strtolower($piece));
59 59
             }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     private function handleOptionalMigrationOption()
95 95
     {
96 96
         if ($this->option('migration') === true) {
97
-            $migrationName = 'create_' . $this->createMigrationName() . '_table';
97
+            $migrationName = 'create_'.$this->createMigrationName().'_table';
98 98
             $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]);
99 99
         }
100 100
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $seederPath = $this->laravel['modules']->config('paths.generator.model');
129 129
 
130
-        return $path . $seederPath . '/' . $this->getModelName() . '.php';
130
+        return $path.$seederPath.'/'.$this->getModelName().'.php';
131 131
     }
132 132
 
133 133
     /**
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/Commands/MigrationCommand.php 2 patches
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.
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 \InvalidArgumentException
69 69
      *
70
-     * @return mixed
70
+     * @return Stub
71 71
      */
72 72
     protected function getTemplateContents()
73 73
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     }
108 108
 
109 109
     /**
110
-     * @return mixed
110
+     * @return string
111 111
      */
112 112
     protected function getDestinationFilePath()
113 113
     {
Please login to merge, or discard this patch.
src/Commands/SeedMakeCommand.php 2 patches
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.
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.
src/Traits/MigrationLoaderTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
      */
12 12
     protected function loadMigrationFiles($module)
13 13
     {
14
-        $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath();
14
+        $path = $this->laravel['modules']->getModulePath($module).$this->getMigrationGeneratorPath();
15 15
 
16
-        $files = $this->laravel['files']->glob($path . '/*_*.php');
16
+        $files = $this->laravel['files']->glob($path.'/*_*.php');
17 17
 
18 18
         foreach ($files as $file) {
19 19
             $this->laravel['files']->requireOnce($file);
Please login to merge, or discard this patch.
src/Process/Installer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $process->setTimeout($this->timeout);
136 136
 
137 137
         if ($this->console instanceof Command) {
138
-            $process->run(function ($type, $line) {
138
+            $process->run(function($type, $line) {
139 139
                 $this->console->line($line);
140 140
             });
141 141
         }
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
     public function getPackageName()
240 240
     {
241 241
         if (is_null($this->version)) {
242
-            return $this->name . ':dev-master';
242
+            return $this->name.':dev-master';
243 243
         }
244 244
 
245
-        return $this->name . ':' . $this->version;
245
+        return $this->name.':'.$this->version;
246 246
     }
247 247
 
248 248
     /**
Please login to merge, or discard this patch.
config/config.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
     'stubs' => [
26 26
         'enabled' => false,
27
-        'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs',
27
+        'path' => base_path().'/vendor/nwidart/laravel-modules/src/Commands/stubs',
28 28
         'files' => [
29 29
             'start' => 'start.php',
30 30
             'routes' => 'Http/routes.php',
Please login to merge, or discard this patch.
src/Support/Stub.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function getPath()
90 90
     {
91
-        return static::getBasePath() . $this->path;
91
+        return static::getBasePath().$this->path;
92 92
     }
93 93
 
94 94
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $contents = file_get_contents($this->getPath());
122 122
 
123 123
         foreach ($this->replaces as $search => $replace) {
124
-            $contents = str_replace('$' . strtoupper($search) . '$', $replace, $contents);
124
+            $contents = str_replace('$'.strtoupper($search).'$', $replace, $contents);
125 125
         }
126 126
 
127 127
         return $contents;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function saveTo($path, $filename)
149 149
     {
150
-        return file_put_contents($path . '/' . $filename, $this->getContents());
150
+        return file_put_contents($path.'/'.$filename, $this->getContents());
151 151
     }
152 152
 
153 153
     /**
Please login to merge, or discard this patch.