Conditions | 4 |
Paths | 5 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
59 | 5 | public function asXml() |
|
60 | { |
||
61 | 5 | if (!count($this->styles)) return '<border/>'; |
|
62 | |||
63 | 1 | $borderXml = ''; |
|
64 | 1 | foreach (array('left', 'right', 'top', 'bottom', 'diagonal') as $type) { |
|
65 | 1 | $borderXml .= $this->getTypeXml($type); |
|
66 | 1 | } |
|
67 | |||
68 | 1 | $diagonal = isset($this->styles[BorderType::DIAGONAL]) ? ' diagonalUp="1"' : ''; |
|
69 | 1 | return sprintf('<border%s>%s</border>', $diagonal, $borderXml); |
|
70 | } |
||
71 | |||
86 |