getStyle(); if (!$style instanceof \PhpOffice\PhpWord\Style\Indentation) { return; } $xmlWriter = $this->getXmlWriter(); $xmlWriter->startElement('w:ind'); $xmlWriter->writeAttribute('w:left', $this->convertTwip($style->getLeft())); $xmlWriter->writeAttribute('w:right', $this->convertTwip($style->getRight())); $firstLine = $style->getFirstLine(); $xmlWriter->writeAttributeIf(null !== $firstLine, 'w:firstLine', $this->convertTwip($firstLine)); $hanging = $style->getHanging(); $xmlWriter->writeAttributeIf(null !== $hanging, 'w:hanging', $this->convertTwip($hanging)); $xmlWriter->endElement(); } }