Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 5 | public static function write(XMLWriter $objWriter, Cell $cell) |
|
17 | { |
||
18 | 5 | $comments = $cell->getWorksheet()->getComments(); |
|
19 | 5 | if (!isset($comments[$cell->getCoordinate()])) { |
|
20 | 5 | return; |
|
21 | } |
||
22 | 1 | $comment = $comments[$cell->getCoordinate()]; |
|
23 | |||
24 | 1 | $objWriter->startElement('office:annotation'); |
|
25 | 1 | $objWriter->writeAttribute('svg:width', $comment->getWidth()); |
|
26 | 1 | $objWriter->writeAttribute('svg:height', $comment->getHeight()); |
|
27 | 1 | $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); |
|
28 | 1 | $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); |
|
29 | 1 | $objWriter->writeElement('dc:creator', $comment->getAuthor()); |
|
30 | 1 | $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); |
|
31 | 1 | $objWriter->endElement(); |
|
32 | 1 | } |
|
34 |