| Total Complexity | 6 | 
| Total Lines | 44 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 12 | class DbHelper  | 
            ||
| 13 | { | 
            ||
| 14 | private $migrationTable;  | 
            ||
| 15 | |||
| 16 | 3 | public function __construct()  | 
            |
| 17 |     { | 
            ||
| 18 | 3 |         $this->migrationTable = Config::get('database.migrations'); | 
            |
| 19 | }  | 
            ||
| 20 | |||
| 21 | 2 | public function backupBatchNumbers(array $migrationsNames): Collection  | 
            |
| 22 |     { | 
            ||
| 23 | 2 | return DB::table($this->migrationTable)  | 
            |
| 24 | 2 |             ->whereIn('migration', $migrationsNames) | 
            |
| 25 | 2 | ->get();  | 
            |
| 26 | }  | 
            ||
| 27 | |||
| 28 | 2 | public function updateBatch(array $migrationsNames, int $batchNumber)  | 
            |
| 34 | 2 | ]);  | 
            |
| 35 | }  | 
            ||
| 36 | |||
| 37 | 2 | public function restoreBatchNumbers(Collection $backupData)  | 
            |
| 44 | 2 | ]);  | 
            |
| 45 | 2 | });  | 
            |
| 46 | }  | 
            ||
| 47 | |||
| 48 | 2 | public function checkIfRollbackIsSuccessful($migrationsForRollback): void  | 
            |
| 59 |