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