Completed
Pull Request — master (#66)
by
unknown
01:47
created
src/Commands/MorphTableCommand.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 class MorphTableCommand extends BaseCommand {
5 5
 
6
-	protected $signature = 'wn:morph-table
6
+    protected $signature = 'wn:morph-table
7 7
         {model : Name of the persistant model or table}
8 8
         {morphable : Name of the morphable identifier}
9 9
         {--add= : specifies additional columns like timestamps, softDeletes, rememberToken and nullableTimestamps.}
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         {--force= : override the existing files}
12 12
     ';
13 13
 
14
-	protected $description = 'Generates creation migration for a morphable pivot table';
14
+    protected $description = 'Generates creation migration for a morphable pivot table';
15 15
 
16 16
     protected $fields;
17 17
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     protected function keys()
49 49
     {
50 50
         // return implode(' ', $this->fields);
51
-		return snake_case(str_singular($this->argument('model')))."_id";
51
+        return snake_case(str_singular($this->argument('model')))."_id";
52 52
     }
53 53
 
54 54
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
     protected function parseFields()
34 34
     {
35 35
         $this->fields = array_map(function($arg, $app) {
36
-            return snake_case(str_singular($this->argument($arg)))."_".$app;
36
+            return snake_case(str_singular($this->argument($arg))) . "_" . $app;
37 37
         }, ['model', 'morphable', 'morphable'], ['id', 'id', 'type']);
38 38
 
39 39
     }
40 40
 
41 41
     protected function schema()
42 42
     {
43
-        return implode(' ', array_map(function($field){
43
+        return implode(' ', array_map(function($field) {
44 44
             return $field . ':' . (substr($field, -3) == '_id' ? 'integer:unsigned' : 'string.50') . ':index';
45 45
         }, $this->fields));
46 46
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     protected function keys()
49 49
     {
50 50
         // return implode(' ', $this->fields);
51
-		return snake_case(str_singular($this->argument('model')))."_id";
51
+		return snake_case(str_singular($this->argument('model'))) . "_id";
52 52
     }
53 53
 
54 54
 }
Please login to merge, or discard this patch.