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<mixed>
      */
-    public function getDebugInfo()
+    public function getDebugInfo(): array
     {
         return [];
     }