summaryrefslogtreecommitdiff
path: root/src/Renderer/Twig/Extensions/Csrf.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-11-29 19:38:28 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-11-29 19:38:28 +0100
commit577c052aff605697cd173967751828a181cca4ad (patch)
treebfb3dd8af8cb0655c52b81be206134e8fe6a2cd5 /src/Renderer/Twig/Extensions/Csrf.php
parent15e6740e12df3fa53c4b0f3e85e3d91590f0ef60 (diff)
Twig update to 3.0.0 and Renderer type hinting
Diffstat (limited to 'src/Renderer/Twig/Extensions/Csrf.php')
-rw-r--r--src/Renderer/Twig/Extensions/Csrf.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Renderer/Twig/Extensions/Csrf.php b/src/Renderer/Twig/Extensions/Csrf.php
index 6e326824..fee1c1f9 100644
--- a/src/Renderer/Twig/Extensions/Csrf.php
+++ b/src/Renderer/Twig/Extensions/Csrf.php
@@ -22,7 +22,7 @@ class Csrf extends TwigExtension
/**
* @return TwigFunction[]
*/
- public function getFunctions()
+ public function getFunctions(): array
{
return [
new TwigFunction('csrf', [$this, 'getCsrfField'], ['is_safe' => ['html']]),
@@ -33,7 +33,7 @@ class Csrf extends TwigExtension
/**
* @return string
*/
- public function getCsrfField()
+ public function getCsrfField(): string
{
return sprintf('<input type="hidden" name="_token" value="%s">', $this->getCsrfToken());
}
@@ -41,7 +41,7 @@ class Csrf extends TwigExtension
/**
* @return string
*/
- public function getCsrfToken()
+ public function getCsrfToken(): string
{
return $this->session->get('_token');
}