Code Duplication    Length = 26-32 lines in 2 locations

src/Command/ConvertCommand.php 1 location

@@ 100-131 (lines=32) @@
97
    /**
98
     * Configures the current command.
99
     */
100
    protected function configure()
101
    {
102
        $this
103
            ->setName('browscap:convert')
104
            ->setDescription('Converts an existing browscap.ini file to a cache.php file.')
105
            ->addArgument(
106
                'file',
107
                InputArgument::OPTIONAL,
108
                'Path to the browscap.ini file',
109
                $this->defaultIniFile
110
            )
111
            ->addOption(
112
                'no-backup',
113
                null,
114
                InputOption::VALUE_NONE,
115
                'Do not backup the previously existing file'
116
            )
117
            ->addOption(
118
                'debug',
119
                'd',
120
                InputOption::VALUE_NONE,
121
                'Should the debug mode entered?'
122
            )
123
            ->addOption(
124
                'cache',
125
                'c',
126
                InputOption::VALUE_OPTIONAL,
127
                'Where the cache files are located',
128
                $this->defaultCacheFolder
129
            )
130
        ;
131
    }
132
133
    /**
134
     * @param InputInterface  $input

src/Command/ParserCommand.php 1 location

@@ 93-118 (lines=26) @@
90
    /**
91
     * Configures the current command.
92
     */
93
    protected function configure()
94
    {
95
        $this
96
            ->setName('browscap:parse')
97
            ->setDescription('Parses a user agent string and dumps the results.')
98
            ->addArgument(
99
                'user-agent',
100
                InputArgument::REQUIRED,
101
                'User agent string to analyze',
102
                null
103
            )
104
            ->addOption(
105
                'debug',
106
                'd',
107
                InputOption::VALUE_NONE,
108
                'Should the debug mode entered?'
109
            )
110
            ->addOption(
111
                'cache',
112
                'c',
113
                InputOption::VALUE_OPTIONAL,
114
                'Where the cache files are located',
115
                $this->defaultCacheFolder
116
            )
117
        ;
118
    }
119
120
    /**
121
     * @param InputInterface  $input