Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | 1 | public function toHtml(array $data) |
|
10 | { |
||
11 | 1 | $text = $data['text']; |
|
12 | 1 | $html = '<blockquote>'; |
|
13 | 1 | $html .= Markdown::defaultTransform($text); |
|
14 | |||
15 | // Add the cite if necessary |
||
16 | 1 | if (isset($data['cite']) && !empty($data['cite'])) { |
|
17 | // remove the indent thats added by Sir Trevor |
||
18 | 1 | $cite = ltrim($data['cite'], '>'); |
|
19 | 1 | $html .= '<cite>' . Markdown::defaultTransform($cite) . '</cite>'; |
|
20 | 1 | } |
|
21 | |||
22 | 1 | $html .= '</blockquote>'; |
|
23 | |||
24 | 1 | return $html; |
|
25 | } |
||
26 | |||
32 |