original_string: public function insertBefore($matchingTitle, $title, $url = null, array $options = [])
      {
          $key = $this->findCrumb($matchingTitle);
  
          if ($key === null) {
              throw new LogicException(sprintf("No crumb matching '%s' could be found.", $matchingTitle));
          }
  
          return $this->insertAt($key, $title, $url, $options);
      }
code: public function insertBefore($matchingTitle, $title, $url = null, array $options = [])
      {
          $key = $this->findCrumb($matchingTitle);
  
          if ($key === null) {
              throw new LogicException(sprintf("No crumb matching '%s' could be found.", $matchingTitle));
          }
  
          return $this->insertAt($key, $title, $url, $options);
      }
code_tokens: public function insertBefore ( $ matchingTitle , $ title , $ url = null , array $ options = [ ] ) { $ key = $ this -> findCrumb ( $ matchingTitle ) ; if ( $ key === null ) { throw new LogicException ( sprintf ( "No crumb matching '%s' could be found." , $ matchingTitle ) ) ; } return $ this -> insertAt ( $ key , $ title , $ url , $ options ) ; }
docstring: Insert a crumb before the first matching crumb with the specified title.
  
  Finds the index of the first crumb that matches the provided class,
  and inserts the supplied callable before it.
  
  @param string $matchingTitle The title of the crumb you want to insert this one before.
  @param string $title Title of the crumb.
  @param string|array|null $url URL of the crumb. Either a string, an array of route params to pass to
  Url::build() or null / empty if the crumb does not have a link.
  @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
  be rendered in (a <li> tag by default). It accepts two special keys:
  - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
  the link)
  - *templateVars*: Specific template vars in case you override the templates provided.
  @return $this
  @throws \LogicException In case the matching crumb can not be found
docstring_tokens: Insert a crumb before the first matching crumb with the specified title .