getStyle(); if (!$style instanceof \PhpOffice\PhpWord\Style\Shadow) { return; } $xmlWriter = $this->getXmlWriter(); $xmlWriter->startElement('v:shadow'); $xmlWriter->writeAttribute('on', 't'); $xmlWriter->writeAttributeIf($style->getColor() !== null, 'color', $style->getColor()); $xmlWriter->writeAttributeIf($style->getOffset() !== null, 'offset', $style->getOffset()); $xmlWriter->endElement(); } }