public function getCurrentItem($menu)
    {
        if (null === $this->matcher) {
            throw new \BadMethodCallException('The matcher must be set to get the current item of a menu');
        }

        $menu = $this->castMenu($menu);

        return $this->retrieveCurrentItem($menu);
    }
public function getCurrentItem($menu)
    {
        if (null === $this->matcher) {
            throw new \BadMethodCallException('The matcher must be set to get the current item of a menu');
        }

        $menu = $this->castMenu($menu);

        return $this->retrieveCurrentItem($menu);
    }
Returns the current item of a menu.

@param ItemInterface|array|string $menu

@return ItemInterface|null