Total Complexity | 8 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 95.24% |
Changes | 0 |
1 | <?php |
||
7 | class Rollback extends BaseCommand |
||
8 | { |
||
9 | use ConfirmableTrait; |
||
10 | |||
11 | /** |
||
12 | * The console command name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $signature = 'triadev:mapping:rollback {--steps=}'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Rollback the last migration steps.'; |
||
24 | |||
25 | /** @var MappingLogRepositoryContract */ |
||
26 | private $mappingLogRepository; |
||
27 | |||
28 | /** |
||
29 | * Rollback constructor. |
||
30 | * @param MappingLogRepositoryContract $mappingLogRepository |
||
31 | */ |
||
32 | 34 | public function __construct(MappingLogRepositoryContract $mappingLogRepository) |
|
37 | 34 | } |
|
38 | |||
39 | /** |
||
40 | * Execute the console command. |
||
41 | * |
||
42 | * @throws \Throwable |
||
43 | */ |
||
44 | 4 | public function handle() |
|
53 | } |
||
54 | 4 | } |
|
55 | |||
56 | /** |
||
57 | * @param int $steps |
||
58 | * @throws \Throwable |
||
59 | */ |
||
60 | 3 | private function deleteLogsBySteps(int $steps) |
|
79 |