| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function render($template, $parameters = []) |
||
| 30 | { |
||
| 31 | $output = '<h1>Hello world!</h1>'; |
||
| 32 | |||
| 33 | if (isset($parameters['exception'])) { |
||
| 34 | /** @var \Exception $exp */ |
||
| 35 | $exp = $parameters['exception']; |
||
| 36 | $output .= '<p>' . $exp->getMessage() . '</p>'; |
||
| 37 | $output .= '<p>' . $exp->getFile() . ' at line ' . $exp->getLine() . '</p>'; |
||
| 38 | $output .= '<pre>' . $exp->getTraceAsString() . '</pre>'; |
||
| 39 | } else { |
||
| 40 | $output .= $parameters[0]; |
||
| 41 | } |
||
| 42 | |||
| 43 | $output .= '<p>' . $template . '</p>'; |
||
| 44 | |||
| 45 | // The ugliest shit ever. But that is how they made it... :/ |
||
| 46 | return \GuzzleHttp\Psr7\stream_for($output); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |