original_string: public function insertAt($index, $title, $url = null, array $options = [])
      {
          if (!isset($this->crumbs[$index])) {
              throw new LogicException(sprintf("No crumb could be found at index '%s'", $index));
          }
  
          array_splice($this->crumbs, $index, 0, [compact('title', 'url', 'options')]);
  
          return $this;
      }
code: public function insertAt($index, $title, $url = null, array $options = [])
      {
          if (!isset($this->crumbs[$index])) {
              throw new LogicException(sprintf("No crumb could be found at index '%s'", $index));
          }
  
          array_splice($this->crumbs, $index, 0, [compact('title', 'url', 'options')]);
  
          return $this;
      }
code_tokens: public function insertAt ( $ index , $ title , $ url = null , array $ options = [ ] ) { if ( ! isset ( $ this -> crumbs [ $ index ] ) ) { throw new LogicException ( sprintf ( "No crumb could be found at index '%s'" , $ index ) ) ; } array_splice ( $ this -> crumbs , $ index , 0 , [ compact ( 'title' , 'url' , 'options' ) ] ) ; return $ this ; }
docstring: Insert a crumb at a specific index.
  
  If the index already exists, the new crumb will be inserted,
  and the existing element will be shifted one index greater.
  If the index is out of bounds, it will throw an exception.
  
  @param int $index The index to insert at.
  @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 index is out of bound
docstring_tokens: Insert a crumb at a specific index .