getStyle(); if (!$style instanceof \PhpOffice\PhpWord\Style\Paragraph) { return ''; } $css = array(); // Alignment $align = $style->getAlign(); $css['text-align'] = $this->getValueIf(!is_null($align), $align); // Spacing $spacing = $style->getSpace(); if (!is_null($spacing)) { $before = $spacing->getBefore(); $after = $spacing->getAfter(); $css['margin-top'] = $this->getValueIf(!is_null($before), ($before / Settings::UNIT_POINT) . 'pt'); $css['margin-bottom'] = $this->getValueIf(!is_null($after), ($after / Settings::UNIT_POINT) . 'pt'); } return $this->assembleCss($css); } }