@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function handle() |
24 | 24 | { |
25 | - foreach ($this->tableFilters() as $table=>$files){ |
|
25 | + foreach ($this->tableFilters() as $table=>$files) { |
|
26 | 26 | |
27 | 27 | $table = strtolower($table); |
28 | 28 | |
@@ -30,29 +30,29 @@ discard block |
||
30 | 30 | |
31 | 31 | $checkMigrationMain = $this->schema->getConnection()->checkMigrationMain(); |
32 | 32 | |
33 | - if($checkMigrationMain===false && isset($this->tableFilters()['Migrations'][0])){ |
|
34 | - $this->apply($this->tableFilters()['Migrations'][0],'migrations'); |
|
33 | + if ($checkMigrationMain===false && isset($this->tableFilters()['Migrations'][0])) { |
|
34 | + $this->apply($this->tableFilters()['Migrations'][0], 'migrations'); |
|
35 | 35 | } |
36 | 36 | |
37 | - $checkMigration = $this->schema->getConnection()->checkMigration($table,$file); |
|
37 | + $checkMigration = $this->schema->getConnection()->checkMigration($table, $file); |
|
38 | 38 | |
39 | - if(!$checkMigration){ |
|
39 | + if (!$checkMigration) { |
|
40 | 40 | |
41 | - $getClassName = preg_replace('@(\d+)_@is','',$file); |
|
41 | + $getClassName = preg_replace('@(\d+)_@is', '', $file); |
|
42 | 42 | $className = $this->getClassName($getClassName); |
43 | 43 | |
44 | 44 | require_once ($file); |
45 | 45 | |
46 | - $capsule = new SchemaCapsule($this->config,$file,$table); |
|
46 | + $capsule = new SchemaCapsule($this->config, $file, $table); |
|
47 | 47 | |
48 | 48 | $this->list[$table][] = (new $className)->up($capsule); |
49 | 49 | |
50 | - if(app()->has('arguments')){ |
|
50 | + if (app()->has('arguments')) { |
|
51 | 51 | app()->terminate('arguments'); |
52 | 52 | } |
53 | 53 | |
54 | - app()->register('arguments','table',$table); |
|
55 | - app()->register('arguments','connection',$this->schema->getConnection()); |
|
54 | + app()->register('arguments', 'table', $table); |
|
55 | + app()->register('arguments', 'connection', $this->schema->getConnection()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -67,14 +67,14 @@ discard block |
||
67 | 67 | * @param $table |
68 | 68 | * @return mixed|string |
69 | 69 | */ |
70 | - public function apply($file,$table) |
|
70 | + public function apply($file, $table) |
|
71 | 71 | { |
72 | - $getClassName = preg_replace('@(\d+)_@is','',$file); |
|
72 | + $getClassName = preg_replace('@(\d+)_@is', '', $file); |
|
73 | 73 | $className = $this->getClassName($getClassName); |
74 | 74 | |
75 | 75 | require_once ($file); |
76 | 76 | |
77 | - $capsule = new SchemaCapsule($this->config,$file,$table); |
|
77 | + $capsule = new SchemaCapsule($this->config, $file, $table); |
|
78 | 78 | |
79 | 79 | $this->list[$table][] = (new $className)->up($capsule); |
80 | 80 |