@@ -33,8 +33,9 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function with($data = []) |
| 35 | 35 | { |
| 36 | - if($data) |
|
| 37 | - $this->dirty = true; |
|
| 36 | + if($data) { |
|
| 37 | + $this->dirty = true; |
|
| 38 | + } |
|
| 38 | 39 | foreach ($data as $key => $value) { |
| 39 | 40 | $this->data[$key] = $value; |
| 40 | 41 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | if(! $file){ |
| 38 | 38 | $file = date('Y_m_d_His_') . $snakeName . '_table'; |
| 39 | 39 | $this->deleteOldMigration($snakeName); |
| 40 | - }else{ |
|
| 40 | + } else{ |
|
| 41 | 41 | $this->deleteOldMigration($file); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -47,7 +47,9 @@ discard block |
||
| 47 | 47 | protected function deleteOldMigration($fileName) |
| 48 | 48 | { |
| 49 | 49 | foreach (new \DirectoryIterator("./database/migrations/") as $fileInfo){ |
| 50 | - if($fileInfo->isDot()) continue; |
|
| 50 | + if($fileInfo->isDot()) { |
|
| 51 | + continue; |
|
| 52 | + } |
|
| 51 | 53 | |
| 52 | 54 | if(strpos($fileInfo->getFilename(), $fileName) !== FALSE){ |
| 53 | 55 | unlink($fileInfo->getPathname()); |