public function addRowWithStyle(array $dataRow, $style) { if (!$style instanceof Style\Style) { throw new InvalidArgumentException('The "$style" argument must be a Style instance and cannot be NULL.'); } $this->setRowStyle($style); $this->addRow($dataRow); $this->resetRowStyleToDefault(); return $this; }