Code Duplication    Length = 27-27 lines in 2 locations

src/Command/FetchCommand.php 1 location

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

src/Command/UpdateCommand.php 1 location

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