protected function getPaginator(AdapterInterface $adapter, int $itemsPerPage): Paginator
    {
        $paginator = new Paginator($adapter);
        $paginator->setItemCountPerPage(max(-1, $itemsPerPage));

        return $paginator;
    }
protected function getPaginator(AdapterInterface $adapter, int $itemsPerPage): Paginator
    {
        $paginator = new Paginator($adapter);
        $paginator->setItemCountPerPage(max(-1, $itemsPerPage));

        return $paginator;
    }
protected function getPaginator ( AdapterInterface $ adapter , int $ itemsPerPage ) : Paginator { $ paginator = new Paginator ( $ adapter ) ; $ paginator -> setItemCountPerPage ( max ( - 1 , $ itemsPerPage ) ) ; return $ paginator ; }
Get configured paginator.

@param AdapterInterface $adapter
@param int              $itemsPerPage

@return Paginator
Get configured paginator .