private function createGitAuthorExtractor($scope, Config $config, $error, $cache, GitRepository $git)
    {
        if ($scope === 'project') {
            return new GitProjectAuthorExtractor($config, $error, $cache);
        } else {
            $extractor = new GitAuthorExtractor($config, $error, $cache);

            $extractor->collectFilesWithCommits($git);

            return $extractor;
        }
    }