Code Duplication    Length = 14-14 lines in 2 locations

src/Console/Snapshots/DeleteSnapshotCommand.php 1 location

@@ 29-42 (lines=14) @@
26
        $this->snapshotRepository = $snapshotRepository;
27
    }
28
29
    public function handle()
30
    {
31
        $snapshots = $this->snapshotRepository->get();
32
33
        $snapshot = $this->chooseSnapshot('Which snapshot number would like to delete?', $snapshots);
34
35
        if (! $snapshot) {
36
            return;
37
        }
38
39
        $snapshot->delete();
40
41
        $this->comment("Snapshot deleted!");
42
    }
43
44
    public function displaySnapshots(Collection $snapshots)
45
    {

src/Console/Snapshots/RestoreSnapshotCommand.php 1 location

@@ 24-37 (lines=14) @@
21
        $this->snapshotRepository = $snapshotRepository;
22
    }
23
24
    public function handle()
25
    {
26
        $snapshots = $this->snapshotRepository->get();
27
28
        $snapshot = $this->chooseSnapshot('Which snapshot number would like to load?', $snapshots);
29
30
        if (! $snapshot) {
31
            return;
32
        }
33
34
        $snapshot->load();
35
36
        $this->info('Snapshot loaded!');
37
    }
38
}
39