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