summaryrefslogtreecommitdiff
path: root/src/Renderer/Twig/Extensions/Assets.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-11-30 15:37:48 +0100
committerGitHub <noreply@github.com>2019-11-30 15:37:48 +0100
commita18c7d13fcae0af77cdaef1947f2160cbf1dc56a (patch)
tree98633eb27bc514e51643766c0c4c45fc5cecfdd3 /src/Renderer/Twig/Extensions/Assets.php
parent14f8d208b817d8d7dccebdb5f7a6ada2bcb9d5f4 (diff)
parente80fb54522c307afec3d8bb474a47dd9d2d5da64 (diff)
Merge pull request #682 from MyIgel/php7.4
PHP 7.4 compatibility, PHP min version 7.2, Twig 3
Diffstat (limited to 'src/Renderer/Twig/Extensions/Assets.php')
-rw-r--r--src/Renderer/Twig/Extensions/Assets.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Renderer/Twig/Extensions/Assets.php b/src/Renderer/Twig/Extensions/Assets.php
index 2cdfb0fd..04d6c9c8 100644
--- a/src/Renderer/Twig/Extensions/Assets.php
+++ b/src/Renderer/Twig/Extensions/Assets.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Http\UrlGenerator;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Assets extends TwigExtension
{
@@ -22,7 +22,7 @@ class Assets extends TwigExtension
/**
* @return TwigFunction[]
*/
- public function getFunctions()
+ public function getFunctions(): array
{
return [
new TwigFunction('asset', [$this, 'getAsset']),
@@ -31,9 +31,9 @@ class Assets extends TwigExtension
/**
* @param string $path
- * @return UrlGenerator|string
+ * @return string
*/
- public function getAsset($path)
+ public function getAsset(string $path): string
{
$path = ltrim($path, '/');