Code Duplication    Length = 12-13 lines in 2 locations

src/Cli/Command/DumpCommand.php 1 location

@@ 25-37 (lines=13) @@
22
        $this->addOption('vault', null, InputOption::VALUE_REQUIRED, 'Vault to use to download state from.');
23
    }
24
25
    protected function executeConfigured(InputInterface $input, OutputInterface $output, Storeman $storeman): int
26
    {
27
        $storeman->dump(
28
            $input->getArgument('path'),
29
            $input->getOption(  'revision') ? (int)$input->getOption('revision') : null,
30
            $input->getOption('vault'),
31
            new SynchronizationProgressListener($output)
32
        );
33
34
        $output->writeln(PHP_EOL . '<info>Done!</info>');
35
36
        return 0;
37
    }
38
}
39

src/Cli/Command/RestoreCommand.php 1 location

@@ 23-34 (lines=12) @@
20
        $this->addOption('vault', null, InputOption::VALUE_REQUIRED, 'Vault to use to download state from.');
21
    }
22
23
    protected function executeConfigured(InputInterface $input, OutputInterface $output, Storeman $storeman): int
24
    {
25
        $storeman->restore(
26
            $input->getOption('revision') ? (int)$input->getOption('revision') : null,
27
            $input->getOption('vault'),
28
            new SynchronizationProgressListener($output)
29
        );
30
31
        $output->writeln(PHP_EOL . '<info>Done!</info>');
32
33
        return 0;
34
    }
35
}
36