Completed
Push — master ( dfff41...bd996f )
by
unknown
11s
created
app/Console/Commands/MakeJsonApiDemoRemove.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
 
170 170
             if (file_exists(app_path('JsonApi'))) {
171 171
                 if(!@rmdir(app_path('JsonApi'))) {
172
-                     throw new \League\Flysystem\Exception('JsonApi directory is not empty!');
172
+                        throw new \League\Flysystem\Exception('JsonApi directory is not empty!');
173 173
                 };
174 174
             }
175 175
         } catch (\League\Flysystem\Exception $e) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -122,19 +122,19 @@  discard block
 block discarded – undo
122 122
     protected function setupTest()
123 123
     {
124 124
         foreach ($this->migrations as $key => $value) {
125
-            $this->migrations[$key] = $value . $this->testPostfix;
125
+            $this->migrations[ $key ] = $value . $this->testPostfix;
126 126
         }
127 127
         foreach ($this->seeds as $key => $value) {
128
-            $this->seeds[$key] = $value . $this->testPostfix;
128
+            $this->seeds[ $key ] = $value . $this->testPostfix;
129 129
         }
130 130
         foreach ($this->controllers as $key => $value) {
131
-            $this->controllers[$key] = $value . $this->testPostfix;
131
+            $this->controllers[ $key ] = $value . $this->testPostfix;
132 132
         }
133 133
         foreach ($this->models as $key => $value) {
134
-            $this->models[$key] = $value . $this->testPostfix;
134
+            $this->models[ $key ] = $value . $this->testPostfix;
135 135
         }
136 136
         foreach ($this->jsonapiEntities as $key => $value) {
137
-            $this->jsonapiEntities[$key] = $value . $this->testPostfix;
137
+            $this->jsonapiEntities[ $key ] = $value . $this->testPostfix;
138 138
         }
139 139
     }
140 140
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         foreach ($this->migrations as $key => $value) {
171 171
             $mask = database_path('migrations/*' . $value);
172
-            array_map( "unlink", glob( $mask ) );
172
+            array_map("unlink", glob($mask));
173 173
         }
174 174
     }
175 175
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             }
214 214
 
215 215
             if (file_exists(app_path('JsonApi'))) {
216
-                if(!@rmdir(app_path('JsonApi'))) {
216
+                if (!@rmdir(app_path('JsonApi'))) {
217 217
                      throw new \League\Flysystem\Exception('JsonApi directory is not empty!');
218 218
                 };
219 219
             }
Please login to merge, or discard this patch.
app/Console/Commands/MakeJsonApiDemo.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
     protected function setupTest()
127 127
     {
128 128
         foreach ($this->migrations as $key => $value) {
129
-            $this->migrations[$key] = $value . $this->testPostfix;
129
+            $this->migrations[ $key ] = $value . $this->testPostfix;
130 130
         }
131 131
         foreach ($this->seeds as $key => $value) {
132
-            $this->seeds[$key] = $value . $this->testPostfix;
132
+            $this->seeds[ $key ] = $value . $this->testPostfix;
133 133
         }
134 134
         foreach ($this->controllers as $key => $value) {
135
-            $this->controllers[$key] = $value . $this->testPostfix;
135
+            $this->controllers[ $key ] = $value . $this->testPostfix;
136 136
         }
137 137
         foreach ($this->models as $key => $value) {
138
-            $this->models[$key] = $value . $this->testPostfix;
138
+            $this->models[ $key ] = $value . $this->testPostfix;
139 139
         }
140 140
         foreach ($this->jsonapiEntities as $key => $value) {
141
-            $this->jsonapiEntities[$key] = $value . $this->testPostfix;
141
+            $this->jsonapiEntities[ $key ] = $value . $this->testPostfix;
142 142
         }
143 143
     }
144 144
 
@@ -177,14 +177,14 @@  discard block
 block discarded – undo
177 177
     protected function copyJsonApiEntities()
178 178
     {
179 179
         foreach ($this->jsonapiEntities as $key => $value) {
180
-            if (file_exists(app_path('JsonApi/'.$value)) && ! $this->option('force')) {
181
-                if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
180
+            if (file_exists(app_path('JsonApi/' . $value)) && !$this->option('force')) {
181
+                if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
182 182
                     continue;
183 183
                 }
184 184
             }
185 185
 
186 186
             copy(
187
-                base_path('stubs/'.$key),
187
+                base_path('stubs/' . $key),
188 188
                 app_path($value)
189 189
             );
190 190
         }
@@ -196,15 +196,15 @@  discard block
 block discarded – undo
196 196
     protected function exportControllers()
197 197
     {
198 198
         foreach ($this->controllers as $key => $value) {
199
-            if (file_exists(app_path('Http/Controllers/Api/v1/'.$value)) && ! $this->option('force')) {
200
-                if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
199
+            if (file_exists(app_path('Http/Controllers/Api/v1/' . $value)) && !$this->option('force')) {
200
+                if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
201 201
                     continue;
202 202
                 }
203 203
             }
204 204
 
205 205
             copy(
206
-                base_path('stubs/Controllers/'.$key),
207
-                app_path('Http/Controllers/Api/v1/'.$value)
206
+                base_path('stubs/Controllers/' . $key),
207
+                app_path('Http/Controllers/Api/v1/' . $value)
208 208
             );
209 209
         }
210 210
     }
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
     protected function exportModels()
216 216
     {
217 217
         foreach ($this->models as $key => $value) {
218
-            if (file_exists(app_path('Models/'.$value)) && ! $this->option('force')) {
219
-                if (! $this->confirm("The [{$value}] model already exists. Do you want to replace it?")) {
218
+            if (file_exists(app_path('Models/' . $value)) && !$this->option('force')) {
219
+                if (!$this->confirm("The [{$value}] model already exists. Do you want to replace it?")) {
220 220
                     continue;
221 221
                 }
222 222
             }
223 223
 
224 224
             copy(
225
-                base_path('stubs/Models/'.$key),
226
-                app_path('Models/'.$value)
225
+                base_path('stubs/Models/' . $key),
226
+                app_path('Models/' . $value)
227 227
             );
228 228
         }
229 229
     }
@@ -235,15 +235,15 @@  discard block
 block discarded – undo
235 235
     {
236 236
         $counter = 0;
237 237
         foreach ($this->migrations as $key => $value) {
238
-            if (file_exists(database_path('migrations/'.$value)) && ! $this->option('force')) {
239
-                if (! $this->confirm("The [{$value}] migration already exists. Do you want to replace it?")) {
238
+            if (file_exists(database_path('migrations/' . $value)) && !$this->option('force')) {
239
+                if (!$this->confirm("The [{$value}] migration already exists. Do you want to replace it?")) {
240 240
                     continue;
241 241
                 }
242 242
             }
243 243
 
244 244
             copy(
245 245
                 base_path('stubs/migrations/' . $key),
246
-                database_path('migrations/'. date('Y_m_d_Hi') . '0' . $counter++ . '_' . $value)
246
+                database_path('migrations/' . date('Y_m_d_Hi') . '0' . $counter++ . '_' . $value)
247 247
             );
248 248
         }
249 249
     }
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
     protected function exportSeeds()
255 255
     {
256 256
         foreach ($this->seeds as $key => $value) {
257
-            if (file_exists(database_path('seeds/'.$value)) && ! $this->option('force')) {
258
-                if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
257
+            if (file_exists(database_path('seeds/' . $value)) && !$this->option('force')) {
258
+                if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
259 259
                     continue;
260 260
                 }
261 261
             }
262 262
 
263 263
             copy(
264
-                base_path('stubs/seeds/'.$key),
265
-                database_path('seeds/'.$value)
264
+                base_path('stubs/seeds/' . $key),
265
+                database_path('seeds/' . $value)
266 266
             );
267 267
         }
268 268
     }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      * @param $src
272 272
      * @param $dst
273 273
      */
274
-    protected function recurse_copy($src,$dst)
274
+    protected function recurse_copy($src, $dst)
275 275
     {
276 276
         $dir = opendir($src);
277 277
         @mkdir($dst);
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Console\Commands;
4 4
 
5 5
 use Illuminate\Console\Command;
6
-use Symfony\Component\Console\Input\InputInterface;
7
-use Symfony\Component\Console\Output\OutputInterface;
8 6
 
9 7
 
10 8
 class MakeJsonApiDemo extends Command
Please login to merge, or discard this patch.