Completed
Pull Request — develop (#186)
by
unknown
07:55
created

PptTableProps   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
ccs 9
cts 9
cp 1
rs 10

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 75
    public function render()
9
    {
10
        // Create XML writer
11 75
        $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
12
13
        // XML header
14 75
        $objWriter->startDocument('1.0', 'UTF-8', 'yes');
15
16
        // a:tblStyleLst
17 75
        $objWriter->startElement('a:tblStyleLst');
18 75
        $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main');
19 75
        $objWriter->writeAttribute('def', '{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}');
20 75
        $objWriter->endElement();
21
22 75
        $this->getZip()->addFromString('ppt/tableStyles.xml', $objWriter->getData());
23
24 75
        return $this->getZip();
25
    }
26
}
27