diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a63ae6ce76..241f2de06e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4175,11 +4175,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 @@ -4190,11 +4185,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 @@ -4235,11 +4225,6 @@ parameters: count: 1 path: src/bundle/Debug/Twig/DebugTemplate.php - - - message: "#^Property Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:\\$fileSystem has no type specified\\.$#" - count: 1 - path: src/bundle/Debug/Twig/DebugTemplate.php - - message: "#^Method Ibexa\\\\Bundle\\\\IO\\\\ApiLoader\\\\HandlerRegistry\\:\\:setHandlersMap\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/bundle/Debug/Twig/DebugTemplate.php b/src/bundle/Debug/Twig/DebugTemplate.php index d943744d69..41ee59ad73 100644 --- a/src/bundle/Debug/Twig/DebugTemplate.php +++ b/src/bundle/Debug/Twig/DebugTemplate.php @@ -17,11 +17,11 @@ */ class DebugTemplate extends Template { - private $fileSystem; + private Filesystem $fileSystem; - public function display(array $context, array $blocks = []) + public function display(array $context, array $blocks = []): void { - $this->fileSystem = $this->fileSystem ?: new Filesystem(); + $this->fileSystem = $this->fileSystem ?? new Filesystem(); // Bufferize to be able to insert template name as HTML comments if applicable. // Layout template name will only appear at the end, to avoid potential quirks with old browsers @@ -68,7 +68,7 @@ public function display(array $context, array $blocks = []) /** * {@inheritdoc} */ - public function getTemplateName() + public function getTemplateName(): string { return ''; } @@ -84,7 +84,7 @@ public function getSourceContext() /** * {@inheritdoc} */ - protected function doDisplay(array $context, array $blocks = []) + protected function doDisplay(array $context, array $blocks = []): string { return ''; } @@ -92,7 +92,7 @@ protected function doDisplay(array $context, array $blocks = []) /** * {@inheritdoc} */ - public function getDebugInfo() + public function getDebugInfo(): array { return []; }