protected function calculateOffset()
    {
        if (empty($this->page) || empty($this->perPage)) {
            throw new \RuntimeException('Cannot calculate offset. Insufficient data');
        }

        $this->offset = ($this->page - 1) * $this->perPage;
    }