Code Duplication    Length = 27-27 lines in 2 locations

src/Command/FetchCommand.php 1 location

@@ 40-66 (lines=27) @@
37
        parent::__construct();
38
    }
39
40
    protected function configure() : void
41
    {
42
        $this
43
            ->setName('browscap:fetch')
44
            ->setDescription('Fetches an updated INI file for Browscap.')
45
            ->addArgument(
46
                'file',
47
                InputArgument::OPTIONAL,
48
                'browscap.ini file',
49
                $this->defaultIniFile
50
            )
51
            ->addOption(
52
                'remote-file',
53
                'r',
54
                InputOption::VALUE_OPTIONAL,
55
                'browscap.ini file to download from remote location (possible values are: ' . IniLoaderInterface::PHP_INI_LITE
56
                . ', ' . IniLoaderInterface::PHP_INI . ', ' . IniLoaderInterface::PHP_INI_FULL . ')',
57
                IniLoaderInterface::PHP_INI
58
            )
59
            ->addOption(
60
                'cache',
61
                'c',
62
                InputOption::VALUE_OPTIONAL,
63
                'Where the cache files are located',
64
                $this->defaultCacheFolder
65
            );
66
    }
67
68
    protected function execute(InputInterface $input, OutputInterface $output) : void
69
    {

src/Command/UpdateCommand.php 1 location

@@ 34-60 (lines=27) @@
31
        parent::__construct();
32
    }
33
34
    protected function configure() : void
35
    {
36
        $this
37
            ->setName('browscap:update')
38
            ->setDescription('Fetches an updated INI file for Browscap and overwrites the current PHP file.')
39
            ->addOption(
40
                'remote-file',
41
                'r',
42
                InputOption::VALUE_OPTIONAL,
43
                'browscap.ini file to download from remote location (possible values are: ' . IniLoaderInterface::PHP_INI_LITE
44
                . ', ' . IniLoaderInterface::PHP_INI . ', ' . IniLoaderInterface::PHP_INI_FULL . ')',
45
                IniLoaderInterface::PHP_INI
46
            )
47
            ->addOption(
48
                'no-backup',
49
                null,
50
                InputOption::VALUE_NONE,
51
                'Do not backup the previously existing file'
52
            )
53
            ->addOption(
54
                'cache',
55
                'c',
56
                InputOption::VALUE_OPTIONAL,
57
                'Where the cache files are located',
58
                $this->defaultCacheFolder
59
            );
60
    }
61
62
    protected function execute(InputInterface $input, OutputInterface $output) : void
63
    {