original_string: public function delete_related_badge($relatedid) {
          global $DB;
          $sql = "(badgeid = :badgeid AND relatedbadgeid = :relatedid) OR " .
                 "(badgeid = :relatedid2 AND relatedbadgeid = :badgeid2)";
          $params = ['badgeid' => $this->id, 'badgeid2' => $this->id, 'relatedid' => $relatedid, 'relatedid2' => $relatedid];
          return $DB->delete_records_select('badge_related', $sql, $params);
      }
code: public function delete_related_badge($relatedid) {
          global $DB;
          $sql = "(badgeid = :badgeid AND relatedbadgeid = :relatedid) OR " .
                 "(badgeid = :relatedid2 AND relatedbadgeid = :badgeid2)";
          $params = ['badgeid' => $this->id, 'badgeid2' => $this->id, 'relatedid' => $relatedid, 'relatedid2' => $relatedid];
          return $DB->delete_records_select('badge_related', $sql, $params);
      }
code_tokens: public function delete_related_badge ( $ relatedid ) { global $ DB ; $ sql = "(badgeid = :badgeid AND relatedbadgeid = :relatedid) OR " . "(badgeid = :relatedid2 AND relatedbadgeid = :badgeid2)" ; $ params = [ 'badgeid' => $ this -> id , 'badgeid2' => $ this -> id , 'relatedid' => $ relatedid , 'relatedid2' => $ relatedid ] ; return $ DB -> delete_records_select ( 'badge_related' , $ sql , $ params ) ; }
docstring: Delete an related badge.
  
  @param int $relatedid Id related badge.
  @return bool A status for delete an related badge.
docstring_tokens: Delete an related badge .