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

PptTableProps   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 25
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 18 1
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