Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.432 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 60 | public function writeTheme($masterId = 1) |
|
35 | { |
||
36 | // Write theme from layout pack |
||
37 | 60 | $parentWriter = $this->getParentWriter(); |
|
38 | 60 | if ($parentWriter instanceof PowerPoint2007) { |
|
39 | 60 | $layoutPack = $parentWriter->getLayoutPack(); |
|
40 | 60 | foreach ($layoutPack->getThemes() as $theme) { |
|
41 | 60 | if ($theme['masterid'] == $masterId) { |
|
42 | 60 | return $theme['body']; |
|
43 | } |
||
44 | } |
||
45 | throw new \Exception('No theme has been found!'); |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |