original_string: public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $target = null) {
  
          if (1 === preg_match("/disabled=\"disabled\"/", $button)) {
  
              $searches = [" disabled=\"disabled\"", "class=\""];
              $replaces = ["", "class=\"disabled "];
  
              $button = StringHelper::replace($button, $searches, $replaces);
          }
  
          $searches = ["<button", "type=\"button\"", "</button>"];
          $replaces = ["<a", "href=\"" . $href . "\"" . (null !== $target ? " target=\"" . $target . "\"" : ""), "</a>"];
  
          return StringHelper::replace($button, $searches, $replaces);
      }
code: public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $target = null) {
  
          if (1 === preg_match("/disabled=\"disabled\"/", $button)) {
  
              $searches = [" disabled=\"disabled\"", "class=\""];
              $replaces = ["", "class=\"disabled "];
  
              $button = StringHelper::replace($button, $searches, $replaces);
          }
  
          $searches = ["<button", "type=\"button\"", "</button>"];
          $replaces = ["<a", "href=\"" . $href . "\"" . (null !== $target ? " target=\"" . $target . "\"" : ""), "</a>"];
  
          return StringHelper::replace($button, $searches, $replaces);
      }
code_tokens: public function bootstrapButtonLinkFilter ( $ button , $ href = self :: DEFAULT_HREF , $ target = null ) { if ( 1 === preg_match ( "/disabled=\"disabled\"/" , $ button ) ) { $ searches = [ " disabled=\"disabled\"" , "class=\"" ] ; $ replaces = [ "" , "class=\"disabled " ] ; $ button = StringHelper :: replace ( $ button , $ searches , $ replaces ) ; } $ searches = [ "<button" , "type=\"button\"" , "</button>" ] ; $ replaces = [ "<a" , "href=\"" . $ href . "\"" . ( null !== $ target ? " target=\"" . $ target . "\"" : "" ) , "</a>" ] ; return StringHelper :: replace ( $ button , $ searches , $ replaces ) ; }
docstring: Transforms a Bootstrap button into an anchor.
  
  @param string $button The button.
  @param string $href The href attribute.
  @param string $target The target attribute.
  @return string Returns the Bootstrap button transformed into an anchor.
docstring_tokens: Transforms a Bootstrap button into an anchor .