@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | if($query===false){ |
31 | 31 | $results[] = []; |
32 | - } |
|
33 | - else{ |
|
32 | + } else{ |
|
34 | 33 | $status =($query['result']!==false) ? true : false; |
35 | 34 | |
36 | 35 | if($status){ |
@@ -38,8 +37,7 @@ discard block |
||
38 | 37 | |
39 | 38 | if(substr($table,-1)=='s'){ |
40 | 39 | app()->command('model create','model:'.strtolower(substr($table,0,-1)).' table:'.$table.' entity:'.$table); |
41 | - } |
|
42 | - else{ |
|
40 | + } else{ |
|
43 | 41 | app()->command('model create','model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
44 | 42 | } |
45 | 43 | } |
@@ -14,39 +14,39 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function processHandler() |
16 | 16 | { |
17 | - return $this->errorHandler(function(){ |
|
17 | + return $this->errorHandler(function() { |
|
18 | 18 | |
19 | 19 | $results = []; |
20 | 20 | |
21 | - foreach ($this->list as $table =>$datas){ |
|
21 | + foreach ($this->list as $table =>$datas) { |
|
22 | 22 | |
23 | - foreach ($datas as $data){ |
|
23 | + foreach ($datas as $data) { |
|
24 | 24 | |
25 | - $query = $this->queryBuilder($table,$data); |
|
25 | + $query = $this->queryBuilder($table, $data); |
|
26 | 26 | |
27 | 27 | $query = $query->handle(); |
28 | 28 | |
29 | - if($query===false){ |
|
29 | + if ($query===false) { |
|
30 | 30 | $results[] = []; |
31 | 31 | } |
32 | - else{ |
|
33 | - $status =($query['result']!==false) ? true : false; |
|
32 | + else { |
|
33 | + $status = ($query['result']!==false) ? true : false; |
|
34 | 34 | |
35 | - if($status){ |
|
35 | + if ($status) { |
|
36 | 36 | |
37 | - $this->schema->getConnection()->registerMigration($table,$data->getFile()); |
|
37 | + $this->schema->getConnection()->registerMigration($table, $data->getFile()); |
|
38 | 38 | |
39 | 39 | $this->schema->getConnection()->generateEntity($table); |
40 | 40 | |
41 | - if(substr($table,-1)=='s'){ |
|
42 | - app()->command('model create','model:'.strtolower(substr($table,0,-1)).' table:'.$table.' entity:'.$table); |
|
41 | + if (substr($table, -1)=='s') { |
|
42 | + app()->command('model create', 'model:'.strtolower(substr($table, 0, -1)).' table:'.$table.' entity:'.$table); |
|
43 | 43 | } |
44 | - else{ |
|
45 | - app()->command('model create','model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
|
44 | + else { |
|
45 | + app()->command('model create', 'model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | - $results[]= [ |
|
49 | + $results[] = [ |
|
50 | 50 | 'success'=>$status, |
51 | 51 | 'file'=>$data->getFile(), |
52 | 52 | 'table'=>$table, |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | { |
77 | 77 | $alterBinds = $object->getAlterBinds(); |
78 | 78 | |
79 | - if(!is_null($alterBinds) && count($alterBinds)>1){ |
|
79 | + if (!is_null($alterBinds) && count($alterBinds)>1) { |
|
80 | 80 | exception()->runtime('Only one command can be applied to alter groups'); |
81 | 81 | } |
82 | 82 | |
83 | - if(count($object->getError())){ |
|
83 | + if (count($object->getError())) { |
|
84 | 84 | exception()->runtime(''.$object->getFile().' -> '.$object->getError()[0].''); |
85 | 85 | } |
86 | 86 |