| 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 | 5 | public function toHtml($json) | |
| 33 |     { | ||
| 34 | // convert the json to an associative array | ||
| 35 | 5 | $input = json_decode($json, true); | |
| 36 | 5 | $html = ''; | |
| 37 | |||
| 38 | // loop trough the data blocks | ||
| 39 | 5 |         foreach ($input['data'] as $block) { | |
| 40 | 5 | $html .= $this->convert(new SirTrevorBlock($block['type'], $block['data'])); | |
| 41 | 5 | } | |
| 42 | |||
| 43 | 5 | return $html; | |
| 44 | } | ||
| 45 | |||
| 62 |