@@ -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,24 +30,24 @@ 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 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - app()->register('arguments','connection',$this->schema->getConnection()); |
|
| 58 | + app()->register('arguments', 'connection', $this->schema->getConnection()); |
|
| 59 | 59 | return $this->processHandler(); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | * @param $table |
| 65 | 65 | * @return mixed|string |
| 66 | 66 | */ |
| 67 | - public function apply($file,$table) |
|
| 67 | + public function apply($file, $table) |
|
| 68 | 68 | { |
| 69 | - $getClassName = preg_replace('@(\d+)_@is','',$file); |
|
| 69 | + $getClassName = preg_replace('@(\d+)_@is', '', $file); |
|
| 70 | 70 | $className = $this->getClassName($getClassName); |
| 71 | 71 | |
| 72 | 72 | require_once ($file); |
| 73 | 73 | |
| 74 | - $capsule = new SchemaCapsule($this->config,$file,$table); |
|
| 74 | + $capsule = new SchemaCapsule($this->config, $file, $table); |
|
| 75 | 75 | |
| 76 | 76 | $this->list[$table][] = (new $className)->up($capsule); |
| 77 | 77 | |