| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 71.43% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class MarkdownExtension extends AbstractExtension { |
||
| 10 | |||
| 11 | private $markdown; |
||
| 12 | |||
| 13 | 13 | public function __construct(CommonMarkConverter $commonMarkConverter) { |
|
| 14 | 13 | $this->markdown = $commonMarkConverter; |
|
| 15 | 13 | } |
|
| 16 | |||
| 17 | 5 | public function getFilters() { |
|
| 18 | return [ |
||
| 19 | 5 | new TwigFilter('markdown', [$this, 'markdown'], ['is_safe' => ['html']]) |
|
| 20 | ]; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function markdown(string $input): string { |
||
| 25 | } |
||
| 26 | } |