private function checkPageSize($pageSize)
    {
        if (!in_array($pageSize, $this->availablePageSizes)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid pageSize, "%s" given. Available pageSize are %s.',
                    $pageSize,
                    implode(', ', $this->availablePageSizes)
                )
            );
        }
    }
private function checkPageSize($pageSize)
    {
        if (!in_array($pageSize, $this->availablePageSizes)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid pageSize, "%s" given. Available pageSize are %s.',
                    $pageSize,
                    implode(', ', $this->availablePageSizes)
                )
            );
        }
    }
private function checkPageSize ( $ pageSize ) { if ( ! in_array ( $ pageSize , $ this -> availablePageSizes ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid pageSize, "%s" given. Available pageSize are %s.' , $ pageSize , implode ( ', ' , $ this -> availablePageSizes ) ) ) ; } }
Check if the pageSize property is valid

@param $pageSize
@throws \InvalidArgumentException
Check if the pageSize property is valid