mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2026-03-14 12:45:52 +01:00
remove deprecations
This commit is contained in:
parent
7074f295ce
commit
eb31781090
2 changed files with 4 additions and 4 deletions
|
|
@ -124,7 +124,7 @@ class MarkdownParser extends MarkdownExtra implements MarkdownParserInterface
|
|||
/**
|
||||
* Simplify detab
|
||||
*/
|
||||
public function detab($text)
|
||||
public function detab($text): string
|
||||
{
|
||||
return str_replace("\t", str_repeat(' ', $this->tab_width), $text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@ class MarkdownTwigExtension extends AbstractExtension
|
|||
$this->parserManager = $parserManager;
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
public function getFilters(): array
|
||||
{
|
||||
return array(
|
||||
new TwigFilter('markdown', array($this, 'markdown'), array('is_safe' => array('html'))),
|
||||
);
|
||||
}
|
||||
|
||||
public function markdown($text, $parser = null)
|
||||
public function markdown($text, $parser = null): string
|
||||
{
|
||||
return $this->parserManager->transform($text, $parser);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return 'markdown';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue