public function nextRow(Row $current) : RowInterface
    {
        $index = array_search($current, $this->rows, true);

        if ($index === false) {
            throw new InvalidArgumentException('The given row is not in the rows array');
        }

        return $this->rows[$index + 1] ?? $this->row();
    }