public function renderBadges()
    {
        $badges = $this->badges;
        if (!$badges) {
            return '';
        }
        $pm = $this->take('package')->getPackageManager();
        $res = '';
        foreach ($badges as $badge => $tpl) {
            if (!$tpl) {
                $tpl = $this->knownBadges[$badge];
            }
            if ($tpl === 'disabled') {
                continue;
            }
            $res .= $this->renderBadge($tpl) . "\n";
        }

        return $res ? "\n$res" : '';
    }