PointUrlExtension deprecation fixed.

This commit is contained in:
Alexey Skobkin 2023-08-17 02:08:01 +03:00
parent c2fb2b6dfc
commit 392ead9b3e
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7

View file

@ -5,8 +5,7 @@ namespace App\Twig;
use App\Entity\User; use App\Entity\User;
use Twig\Extension\AbstractExtension; use Twig\Extension\AbstractExtension;
use Twig\TwigFilter; use Twig\{TwigFilter, TwigFunction};
use Twig\TwigFunction;
class PointUrlExtension extends AbstractExtension class PointUrlExtension extends AbstractExtension
{ {
@ -16,7 +15,7 @@ class PointUrlExtension extends AbstractExtension
) { ) {
} }
public function getFunctions() public function getFunctions(): array
{ {
return [ return [
new TwigFunction('point_avatar', [$this, 'avatarFunction']), new TwigFunction('point_avatar', [$this, 'avatarFunction']),
@ -29,7 +28,7 @@ class PointUrlExtension extends AbstractExtension
]; ];
} }
public function getFilters() public function getFilters(): array
{ {
return [ return [
new TwigFilter('point_avatar', [$this, 'avatarFunction']), new TwigFilter('point_avatar', [$this, 'avatarFunction']),