diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3fd6b490fa..8017126337 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4155,11 +4155,6 @@ parameters: count: 1 path: src/bundle/Debug/IbexaDebugBundle.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Debug/Twig/DebugTemplate.php - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#" count: 1 @@ -4170,11 +4165,6 @@ parameters: count: 1 path: src/bundle/Debug/Twig/DebugTemplate.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Debug/Twig/DebugTemplate.php - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#" count: 1 @@ -4185,16 +4175,6 @@ parameters: count: 1 path: src/bundle/Debug/Twig/DebugTemplate.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:getDebugInfo\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/bundle/Debug/Twig/DebugTemplate.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:getSourceContext\\(\\) should return Twig\\\\Source but returns string\\.$#" - count: 1 - path: src/bundle/Debug/Twig/DebugTemplate.php - - message: "#^Parameter \\#1 \\$haystack of function stripos expects string, string\\|false\\|null given\\.$#" count: 1 diff --git a/src/bundle/Debug/Twig/DebugTemplate.php b/src/bundle/Debug/Twig/DebugTemplate.php index d943744d69..958602d601 100644 --- a/src/bundle/Debug/Twig/DebugTemplate.php +++ b/src/bundle/Debug/Twig/DebugTemplate.php @@ -7,6 +7,7 @@ namespace Ibexa\Bundle\Debug\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 []; }