Code Duplication    Length = 14-14 lines in 2 locations

src/Command/CheckUpdateCommand.php 1 location

@@ 55-68 (lines=14) @@
52
            );
53
    }
54
55
    protected function execute(InputInterface $input, OutputInterface $output) : void
56
    {
57
        $logger = LoggerHelper::createDefaultLogger($output);
58
59
        $fileCache = new FilesystemCache($input->getOption('cache'));
60
        $cache = new SimpleCacheAdapter($fileCache);
61
62
        $logger->debug('started checking for new version of remote file');
63
64
        $browscap = new BrowscapUpdater($cache, $logger);
65
        $browscap->checkUpdate();
66
67
        $logger->debug('finished checking for new version of remote file');
68
    }
69
}
70

src/Command/UpdateCommand.php 1 location

@@ 70-83 (lines=14) @@
67
            );
68
    }
69
70
    protected function execute(InputInterface $input, OutputInterface $output) : void
71
    {
72
        $logger = LoggerHelper::createDefaultLogger($output);
73
74
        $fileCache = new FilesystemCache($input->getOption('cache'));
75
        $cache = new SimpleCacheAdapter($fileCache);
76
77
        $logger->info('started updating cache with remote file');
78
79
        $browscap = new BrowscapUpdater($cache, $logger);
80
        $browscap->update($input->getOption('remote-file'));
81
82
        $logger->info('finished updating cache with remote file');
83
    }
84
}
85