| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 1 | public function toHtml($json) |
|
| 33 | { |
||
| 34 | // convert the json to an associative array |
||
| 35 | 1 | $input = json_decode($json, true); |
|
| 36 | 1 | $html = ''; |
|
| 37 | |||
| 38 | // loop trough the data blocks |
||
| 39 | 1 | foreach ($input['data'] as $block) { |
|
| 40 | 1 | $html .= $this->convert($block['type'], $block['data']); |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | 1 | return $html; |
|
| 44 | } |
||
| 45 | |||
| 63 |