<?php

namespace AppBundle\Twig;

class StripslashesExtension extends \Twig_Extension
{
    /**
     * Returns a list of filters.
     *
     * @return array
     */
    public function getFilters(): array
    {
        return [
            new \Twig_SimpleFilter('stripslashes', [$this, 'stripslashes']),
        ];
    }

    public function stripslashes(string $subject): string
    {
        return stripslashes($subject);
    }
}
