src/Knp/Menu/Twig/MenuExtension.php
public function getCurrentItem($menu)
    {
        $rootItem = $this->get($menu);

        $currentItem = $this->helper->getCurrentItem($rootItem);

        if (null === $currentItem) {
            $currentItem = $rootItem;
        }

        return $currentItem;
    }
public function getCurrentItem($menu)
    {
        $rootItem = $this->get($menu);

        $currentItem = $this->helper->getCurrentItem($rootItem);

        if (null === $currentItem) {
            $currentItem = $rootItem;
        }

        return $currentItem;
    }
Returns the current item of a menu.

@param ItemInterface|string $menu

@return ItemInterface