original_string: protected function renderCrumbs(): string
      {
          end($this->breadcrumbs);
          $lastKey = key($this->breadcrumbs);
  
          $output = '';
  
          $position = 1;
  
          foreach ($this->breadcrumbs as $key => $crumb) {
              $isLast = ($lastKey === $key);
  
              $href = $crumb['href'];
  
              // Add a slash when the URL is relative and does not contain a slash at the start.
              if (!preg_match('#^https?://.*#', $href) && mb_substr($href, 0, 1) !== '/') {
                  $href = "/{$href}";
              }
  
              $output .= $this->renderCrumb($crumb['name'], $href, $isLast, $position);
              $position++;
          }
  
          return $output;
      }
code: protected function renderCrumbs(): string
      {
          end($this->breadcrumbs);
          $lastKey = key($this->breadcrumbs);
  
          $output = '';
  
          $position = 1;
  
          foreach ($this->breadcrumbs as $key => $crumb) {
              $isLast = ($lastKey === $key);
  
              $href = $crumb['href'];
  
              // Add a slash when the URL is relative and does not contain a slash at the start.
              if (!preg_match('#^https?://.*#', $href) && mb_substr($href, 0, 1) !== '/') {
                  $href = "/{$href}";
              }
  
              $output .= $this->renderCrumb($crumb['name'], $href, $isLast, $position);
              $position++;
          }
  
          return $output;
      }
code_tokens: protected function renderCrumbs ( ) : string { end ( $ this -> breadcrumbs ) ; $ lastKey = key ( $ this -> breadcrumbs ) ; $ output = '' ; $ position = 1 ; foreach ( $ this -> breadcrumbs as $ key => $ crumb ) { $ isLast = ( $ lastKey === $ key ) ; $ href = $ crumb [ 'href' ] ; // Add a slash when the URL is relative and does not contain a slash at the start. if ( ! preg_match ( '#^https?://.*#' , $ href ) && mb_substr ( $ href , 0 , 1 ) !== '/' ) { $ href = "/{$href}" ; } $ output .= $ this -> renderCrumb ( $ crumb [ 'name' ] , $ href , $ isLast , $ position ) ; $ position ++ ; } return $ output ; }
docstring: Renders the crumbs.
  
  @return string
docstring_tokens: Renders the crumbs .