From 11e6efee683dae33f1090c4c555302b2b8d11ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Mar 2021 15:46:46 +0100 Subject: [PATCH] fix comments --- src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php | 6 ++++++ .../Templating/ChillMarkdownRenderExtension.php | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php index 3866dcd51..37c436f7c 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php @@ -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 diff --git a/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php b/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php index a3b32ec18..db2844cfe 100644 --- a/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php +++ b/src/Bundle/ChillMainBundle/Templating/ChillMarkdownRenderExtension.php @@ -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); }