Skip to content

Commit

Permalink
Fixed missing return types for DebugTemplate class
Browse files Browse the repository at this point in the history
For more details see ezsystems/ezplatform-kernel#406

Co-Authored-By: Paweł Niedzielski <Steveb-p@users.noreply.github.com>
  • Loading branch information
alongosz and Steveb-p authored Apr 17, 2024
1 parent 7e47231 commit 81464c6
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions eZ/Bundle/EzPublishDebugBundle/Twig/DebugTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace eZ\Bundle\EzPublishDebugBundle\Twig;

use Symfony\Component\Filesystem\Filesystem;
use Twig\Source;
use Twig\Template;

/**
Expand All @@ -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();

Expand Down Expand Up @@ -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 [];
}
Expand Down

0 comments on commit 81464c6

Please sign in to comment.