| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Markdown |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @deprecated v0.58.0-beta use Markdown::render() instead. |
||
| 15 | */ |
||
| 16 | public static function parse(string $markdown, ?string $sourceModel = null): string |
||
| 17 | { |
||
| 18 | return static::render($markdown, $sourceModel); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Render a Markdown string into HTML. |
||
| 23 | * |
||
| 24 | * If a source model is provided, the Markdown will be converted using the dynamic MarkdownService, |
||
| 25 | * otherwise, the pre-configured singleton from the service container will be used instead. |
||
| 26 | * |
||
| 27 | * @return string $html |
||
| 28 | */ |
||
| 29 | public static function render(string $markdown, ?string $sourceModel = null): string |
||
| 34 | } |
||
| 35 | } |
||
| 36 |