Completed
Pull Request — develop (#187)
by Franck
19:04 queued 41s
created

PptTableProps   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

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