Completed
Pull Request — develop (#565)
by
unknown
06:14
created

PptTableProps::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 9.6666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace PhpOffice\PhpPresentation\Writer\PowerPoint2007;
3
4
use PhpOffice\Common\XMLWriter;
5
6
class PptTableProps extends AbstractDecoratorWriter
7
{
8
    /**
9
     * @return \PhpOffice\Common\Adapter\Zip\ZipInterface
10
     * @throws \Exception
11
     */
12
    public function render()
13
    {
14
        // Create XML writer
15
        $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
16
17
        // XML header
18
        $objWriter->startDocument('1.0', 'UTF-8', 'yes');
19
20
        // a:tblStyleLst
21
        $objWriter->startElement('a:tblStyleLst');
22
        $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main');
23
        $objWriter->writeAttribute('def', '{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}');
24
        $objWriter->endElement();
25
26
        $this->getZip()->addFromString('ppt/tableStyles.xml', $objWriter->getData());
27
28
        return $this->getZip();
29
    }
30
}
31