protected function getAnalyzersResultsCounts()
{
$list = Analyzer::getThemeAnalyzers($this->themesToShow);
$list = '"' . join('", "', $list) . '"';
$result = $this->sqlite->query(<<<SQL
SELECT analyzer, count(*) AS issues, count(distinct file) AS files, severity AS severity FROM results
WHERE analyzer IN ({$list})
GROUP BY analyzer
HAVING Issues > 0
SQL
);
$return = array();
while ($row = $result->fetchArray(\SQLITE3_ASSOC)) {
$analyzer = Analyzer::getInstance($row['analyzer']);
$row['label'] = $analyzer->getDescription()->getName();
$row['recipes'] = join(', ', $this->themesForAnalyzer[$row['analyzer']]);
$return[] = $row;
}
return $return;
}