Code Duplication    Length = 14-14 lines in 2 locations

src/Command/CheckUpdateCommand.php 1 location

@@ 47-60 (lines=14) @@
44
            );
45
    }
46
47
    protected function execute(InputInterface $input, OutputInterface $output) : void
48
    {
49
        $logger = LoggerHelper::createDefaultLogger($output);
50
51
        $fileCache = new FilesystemCache($input->getOption('cache'));
52
        $cache = new SimpleCacheAdapter($fileCache);
53
54
        $logger->debug('started checking for new version of remote file');
55
56
        $browscap = new BrowscapUpdater($cache, $logger);
57
        $browscap->checkUpdate();
58
59
        $logger->debug('finished checking for new version of remote file');
60
    }
61
}
62

src/Command/UpdateCommand.php 1 location

@@ 62-75 (lines=14) @@
59
            );
60
    }
61
62
    protected function execute(InputInterface $input, OutputInterface $output) : void
63
    {
64
        $logger = LoggerHelper::createDefaultLogger($output);
65
66
        $fileCache = new FilesystemCache($input->getOption('cache'));
67
        $cache = new SimpleCacheAdapter($fileCache);
68
69
        $logger->info('started updating cache with remote file');
70
71
        $browscap = new BrowscapUpdater($cache, $logger);
72
        $browscap->update($input->getOption('remote-file'));
73
74
        $logger->info('finished updating cache with remote file');
75
    }
76
}
77