@@ -10,7 +10,7 @@ use League\CommonMark\Util\HtmlElement;
class ColorRenderer implements NodeRendererInterface
{
- public function render(Node $node, ChildNodeRendererInterface $childRenderer)
+ public function render(Node $node, ChildNodeRendererInterface $childRenderer): \Stringable|string|null
if (!($node instanceof ColorText)) {
throw new \InvalidArgumentException('Le noeud doit être une instance de ColorText');
class IntroRenderer implements NodeRendererInterface
IntroBlock::assertInstanceOf($node);
/** @var IntroBlock $node */
@@ -7,7 +7,7 @@ use Twig\TwigFunction;
class LastArticles extends AbstractExtension
- public function getFunctions()
+ public function getFunctions(): array
return [
new TwigFunction('last_articles', [LastRuntimeExtension::class, 'getLastArticles'])
@@ -7,7 +7,7 @@ use Twig\TwigFilter;
class MarkdownExtension extends AbstractExtension
- public function getFilters()
+ public function getFilters(): array
new TwigFilter('markdown', [AppRuntimeExtension::class, 'parse'], ['is_safe' => ['html']])