| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | protected function syntaxHighlighter($language, $content) { |
||
| 41 | |||
| 42 | // Initialize the template. |
||
| 43 | $template = "<pre %attributes%>\n%innerHTML%\n</pre>"; |
||
| 44 | |||
| 45 | // Initialize the attributes. |
||
| 46 | $attributes = []; |
||
| 47 | |||
| 48 | $attributes["class"][] = "brush:"; |
||
| 49 | $attributes["class"][] = (null !== $language ? $language : "php") . ";"; |
||
|
|
|||
| 50 | |||
| 51 | // Return the HTML. |
||
| 52 | return StringUtility::replace($template, ["%attributes%", "%innerHTML%"], [StringUtility::parseArray($attributes), $content]); |
||
| 53 | } |
||
| 56 |