private function getCurrentItem(ItemInterface $item)
    {
        foreach ($item->getChildren() as $child) {
            if ($this->matcher->isCurrent($child)) {
                return $child;
            } else {
                $child = $this->getCurrentItem($child);
                if ($child) {
                    return $child;
                }
            }
        }

        return null;
    }
private function getCurrentItem(ItemInterface $item)
    {
        foreach ($item->getChildren() as $child) {
            if ($this->matcher->isCurrent($child)) {
                return $child;
            } else {
                $child = $this->getCurrentItem($child);
                if ($child) {
                    return $child;
                }
            }
        }

        return null;
    }
private function getCurrentItem ( ItemInterface $ item ) { foreach ( $ item -> getChildren ( ) as $ child ) { if ( $ this -> matcher -> isCurrent ( $ child ) ) { return $ child ; } else { $ child = $ this -> getCurrentItem ( $ child ) ; if ( $ child ) { return $ child ; } } } return null ; }
Get current item

@param ItemInterface $item

@return ItemInterface|null
Get current item