paragraphStyle = $this->setParagraphStyle($paragraphStyle); } /** * Get Paragraph style * * @return string|\PhpOffice\PhpWord\Style\Paragraph */ public function getParagraphStyle() { return $this->paragraphStyle; } /** * Set Paragraph style * * @param string|array|\PhpOffice\PhpWord\Style\Paragraph $style * @return string|\PhpOffice\PhpWord\Style\Paragraph */ public function setParagraphStyle($style = null) { if (is_array($style)) { $this->paragraphStyle = new Paragraph(); $this->paragraphStyle->setStyleByArray($style); } elseif ($style instanceof Paragraph) { $this->paragraphStyle = $style; } elseif (null === $style) { $this->paragraphStyle = new Paragraph(); } else { $this->paragraphStyle = $style; } return $this->paragraphStyle; } }