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