<?php

namespace App\Twig;

use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

class AppExtension extends AbstractExtension
{
    public function getFilters(): array
    {
        return [
            new TwigFilter('rot13', [$this, 'rot13']),
        ];
    }

    public function rot13(string $string): string
    {
        return str_rot13($string);
    }
}