@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * @var $type |
17 | 17 | */ |
18 | - public $type='migration'; |
|
18 | + public $type = 'migration'; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @var array |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * @var $commandRule |
35 | 35 | */ |
36 | - public $commandRule=['create'=>[ |
|
37 | - 'name','table' |
|
36 | + public $commandRule = ['create'=>[ |
|
37 | + 'name', 'table' |
|
38 | 38 | ], |
39 | 39 | 'push'=>[]]; |
40 | 40 | |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | |
58 | 58 | echo $this->info('Migration Push Process :'); |
59 | 59 | |
60 | - $this->table->setHeaders(['id','table','file','type','status','message','seeder']); |
|
60 | + $this->table->setHeaders(['id', 'table', 'file', 'type', 'status', 'message', 'seeder']); |
|
61 | 61 | |
62 | 62 | foreach ($pushResult as $key=>$value) { |
63 | 63 | |
64 | - $pushResultFile = explode("/",$pushResult[$key]['file']); |
|
64 | + $pushResultFile = explode("/", $pushResult[$key]['file']); |
|
65 | 65 | $file = end($pushResultFile); |
66 | 66 | |
67 | - if($pushResult[$key]['success']===true){ |
|
67 | + if ($pushResult[$key]['success']===true) { |
|
68 | 68 | |
69 | 69 | $this->table->addRow([ |
70 | 70 | $key, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | 'No', |
77 | 77 | ]); |
78 | 78 | } |
79 | - else{ |
|
79 | + else { |
|
80 | 80 | |
81 | 81 | $this->table->addRow([ |
82 | 82 | $key, |
@@ -108,19 +108,19 @@ discard block |
||
108 | 108 | |
109 | 109 | $stubType = (!file_exists($tablePath)) ? 'create' : 'alter'; |
110 | 110 | |
111 | - if(!file_exists($path)){ |
|
111 | + if (!file_exists($path)) { |
|
112 | 112 | |
113 | - $this->file->fs->mkdir($path,0777); |
|
114 | - $this->file->fs->chmod($path,0777,000,true); |
|
113 | + $this->file->fs->mkdir($path, 0777); |
|
114 | + $this->file->fs->chmod($path, 0777, 000, true); |
|
115 | 115 | } |
116 | 116 | |
117 | - $migrationCreate = $this->getSchema()->stub($this->argument['table'],$this->argument['name'],$stubType); |
|
117 | + $migrationCreate = $this->getSchema()->stub($this->argument['table'], $this->argument['name'], $stubType); |
|
118 | 118 | |
119 | 119 | echo $this->info('Migration Create Process :'); |
120 | 120 | |
121 | - $this->table->setHeaders(['id','method','table','style','name','type','status','message']); |
|
121 | + $this->table->setHeaders(['id', 'method', 'table', 'style', 'name', 'type', 'status', 'message']); |
|
122 | 122 | |
123 | - foreach ($migrationCreate['directory'] as $key=>$data){ |
|
123 | + foreach ($migrationCreate['directory'] as $key=>$data) { |
|
124 | 124 | |
125 | 125 | $this->table->addRow([ |
126 | 126 | $key, |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ]); |
136 | 136 | } |
137 | 137 | |
138 | - foreach ($migrationCreate['file'] as $key=>$data){ |
|
138 | + foreach ($migrationCreate['file'] as $key=>$data) { |
|
139 | 139 | |
140 | 140 | $this->table->addRow([ |
141 | 141 | $key, |