fix comments

This commit is contained in:
Julien Fastré 2021-03-23 15:46:46 +01:00
parent 03b94c05b8
commit 11e6efee68
2 changed files with 8 additions and 3 deletions

View File

@ -24,7 +24,13 @@ use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
/**
* Create a Textarea
*
* By default, add a WYSIWYG editor.
*
* Options:
*
* * `disable_editor`: set true to disable editor
*
*/
final class ChillTextareaType extends AbstractType

View File

@ -29,7 +29,6 @@ use Parsedown;
final class ChillMarkdownRenderExtension extends AbstractExtension
{
/**
*
* @var Parsedown
*/
protected $parsedown;
@ -40,7 +39,7 @@ final class ChillMarkdownRenderExtension extends AbstractExtension
$this->parsedown->setSafeMode(true);
}
public function getFilters()
public function getFilters(): array
{
return [
new TwigFilter('chill_markdown_to_html', [$this, 'renderMarkdownToHtml'], [
@ -49,7 +48,7 @@ final class ChillMarkdownRenderExtension extends AbstractExtension
];
}
public function renderMarkdownToHtml($var)
public function renderMarkdownToHtml(string $var): string
{
return $this->parsedown->parse($var);
}