src/Provider/PaginatedCollectionRequestProvider.php
private function validatePaginatedCollectionRequest(PaginatedCollectionRequestInterface $paginationInfo)
    {
        if (!(ctype_digit((string)$paginationInfo->getPage()) && 0 <= (int)$paginationInfo->getPage())) {
            throw new \InvalidArgumentException('Page must be a positive integer');
        }

        if (!(ctype_digit((string)$paginationInfo->getItemsPerPage()) && 0 <= (int)$paginationInfo->getItemsPerPage())) {
            throw new \InvalidArgumentException('Items per page must be a positive integer');
        }
    }
private function validatePaginatedCollectionRequest(PaginatedCollectionRequestInterface $paginationInfo)
    {
        if (!(ctype_digit((string)$paginationInfo->getPage()) && 0 <= (int)$paginationInfo->getPage())) {
            throw new \InvalidArgumentException('Page must be a positive integer');
        }

        if (!(ctype_digit((string)$paginationInfo->getItemsPerPage()) && 0 <= (int)$paginationInfo->getItemsPerPage())) {
            throw new \InvalidArgumentException('Items per page must be a positive integer');
        }
    }
private function validatePaginatedCollectionRequest ( PaginatedCollectionRequestInterface $ paginationInfo ) { if ( ! ( ctype_digit ( ( string ) $ paginationInfo -> getPage ( ) ) && 0 <= ( int ) $ paginationInfo -> getPage ( ) ) ) { throw new \ InvalidArgumentException ( 'Page must be a positive integer' ) ; } if ( ! ( ctype_digit ( ( string ) $ paginationInfo -> getItemsPerPage ( ) ) && 0 <= ( int ) $ paginationInfo -> getItemsPerPage ( ) ) ) { throw new \ InvalidArgumentException ( 'Items per page must be a positive integer' ) ; } }
Checks the pagination request validity

@param PaginatedCollectionRequestInterface $paginationInfo

@throws \InvalidArgumentException
Checks the pagination request validity