/** * @param null|int $index */ public function start($index = null) { if ($this->sheetWrapper->getObject() === null) { throw new \LogicException(); } if ($index !== null && !is_int($index)) { throw new \InvalidArgumentException(); } if ($index === null) { $this->sheetWrapper->increaseRow(); } else { $this->sheetWrapper->setRow($index); } }