From 81464c68ca1b0663f181e8dbc76757ceded2b5e1 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 17 Apr 2024 16:38:58 +0200 Subject: [PATCH] Fixed missing return types for DebugTemplate class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ezsystems/ezplatform-kernel/pull/406 Co-Authored-By: Paweł Niedzielski --- .../Twig/DebugTemplate.php | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/eZ/Bundle/EzPublishDebugBundle/Twig/DebugTemplate.php b/eZ/Bundle/EzPublishDebugBundle/Twig/DebugTemplate.php index 313386a7f9..0d10379826 100644 --- a/eZ/Bundle/EzPublishDebugBundle/Twig/DebugTemplate.php +++ b/eZ/Bundle/EzPublishDebugBundle/Twig/DebugTemplate.php @@ -7,6 +7,7 @@ namespace eZ\Bundle\EzPublishDebugBundle\Twig; use Symfony\Component\Filesystem\Filesystem; +use Twig\Source; use Twig\Template; /** @@ -19,7 +20,7 @@ class DebugTemplate extends Template { private $fileSystem; - public function display(array $context, array $blocks = []) + public function display(array $context, array $blocks = []): void { $this->fileSystem = $this->fileSystem ?: new Filesystem(); @@ -65,34 +66,25 @@ public function display(array $context, array $blocks = []) } } - /** - * {@inheritdoc} - */ - public function getTemplateName() + public function getTemplateName(): string { return ''; } - /** - * {@inheritdoc} - */ - public function getSourceContext() + public function getSourceContext(): Source { - return ''; + return new Source('', ''); } - /** - * {@inheritdoc} - */ - protected function doDisplay(array $context, array $blocks = []) + protected function doDisplay(array $context, array $blocks = []): string { return ''; } /** - * {@inheritdoc} + * @return array */ - public function getDebugInfo() + public function getDebugInfo(): array { return []; }