paragraphStyle = $this->setParagraphStyle($paragraphStyle); } /** * Get Paragraph style. * * @return \PhpOffice\PhpWord\Style\Paragraph|string */ public function getParagraphStyle() { return $this->paragraphStyle; } /** * Set Paragraph style. * * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $style * * @return \PhpOffice\PhpWord\Style\Paragraph|string */ 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; } }