code: public function isCurrent(ItemInterface $item)
      {
          if (null === $this->matcher) {
              throw new \BadMethodCallException('The matcher must be set to get the breadcrumbs array');
          }
  
          return $this->matcher->isCurrent($item);
      }
docs: Checks whether an item is current.
  
  @param ItemInterface $item
  
  @return boolean