Skip to content

Commit aa67b28

Browse files
authored
Add return type hints (#39)
... to address deprecation notices emitted by Symfony's DebugClassLoader. Fixes #38.
1 parent 4a38162 commit aa67b28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Twig/Extension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ public function __construct(bool $disabled, string $siteId, string $piwikHost, s
4646
$this->disableCookies = $disableCookies;
4747
}
4848

49-
public function getFunctions()
49+
public function getFunctions(): array
5050
{
5151
return [
5252
new TwigFunction('piwik_code', [$this, 'piwikCode'], ['is_safe' => ['html']]),
5353
new TwigFunction('piwik', [$this, 'piwikPush']),
5454
];
5555
}
5656

57-
public function piwikPush(...$paqs)
57+
public function piwikPush(...$paqs): void
5858
{
5959
$this->paqs[] = $paqs;
6060
}
6161

62-
public function piwikCode()
62+
public function piwikCode(): string
6363
{
6464
if ($this->disabled) {
6565
return '<!-- Piwik is disabled due to webfactory_piwik.disabled=true in your configuration -->';

0 commit comments

Comments
 (0)