original_string: 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" : '';
      }
code: 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" : '';
      }
code_tokens: 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" : '' ; }
docstring: Render all configured badges.
  @return string
docstring_tokens: Render all configured badges .