Code Duplication    Length = 17-17 lines in 2 locations

src/Command/CheckUpdateCommand.php 1 location

@@ 103-119 (lines=17) @@
100
     *
101
     * @return int|null|void
102
     */
103
    protected function execute(InputInterface $input, OutputInterface $output)
104
    {
105
        $loggerHelper = new LoggerHelper();
106
        $logger       = $loggerHelper->create($input->getOption('debug'));
107
108
        $logger->debug('started checking for new version of remote file');
109
110
        $browscap = $this->getBrowscap();
111
112
        $browscap
113
            ->setLogger($logger)
114
            ->setCache($this->cache)
115
            ->checkUpdate($input->getOption('remote-file'))
116
        ;
117
118
        $logger->debug('finished checking for new version of remote file');
119
    }
120
121
    private function getBrowscap()
122
    {

src/Command/UpdateCommand.php 1 location

@@ 109-125 (lines=17) @@
106
     *
107
     * @return int|null|void
108
     */
109
    protected function execute(InputInterface $input, OutputInterface $output)
110
    {
111
        $loggerHelper = new LoggerHelper();
112
        $logger       = $loggerHelper->create($input->getOption('debug'));
113
114
        $logger->info('started updating cache with remote file');
115
116
        $browscap = $this->getBrowscap();
117
118
        $browscap
119
            ->setLogger($logger)
120
            ->setCache($this->cache)
121
            ->update($input->getOption('remote-file'))
122
        ;
123
124
        $logger->info('finished updating cache with remote file');
125
    }
126
127
    private function getBrowscap()
128
    {