| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | 1 | public function toJson(\DOMElement $node) |
|
| 12 | { |
||
| 13 | 1 | $cite = $this->getCiteHtml($node); |
|
| 14 | |||
| 15 | // we use the remaining html to create the remaining text |
||
| 16 | 1 | $html = $node->ownerDocument->saveXML($node); |
|
| 17 | 1 | $html = preg_replace('/<(\/|)blockquote>/i', '', $html); |
|
| 18 | |||
| 19 | 1 | return new SirTrevorBlock( |
|
| 20 | 1 | 'quote', |
|
| 21 | array( |
||
| 22 | 1 | 'text' => ' ' . $this->htmlToMarkdown($html), |
|
| 23 | 1 | 'cite' => $cite, |
|
| 24 | ) |
||
| 25 | 1 | ); |
|
| 26 | } |
||
| 27 | |||
| 57 |