<commit_before><?php

namespace Knp\Bundle\TranslatorBundle\Templating\Twig;

use Symfony\Bridge\Twig\Extension\TranslationExtension as BaseTranslationExtension;
use Knp\Bundle\TranslatorBundle\Templating\Helper\TranslatorHelper;

/**
 * Provides integration of the Translation component with Twig.
 *
 * @author <NAME> <<EMAIL>>
 */
class TranslationExtension extends BaseTranslationExtension
{
    private $translatorHelper;

    public function __construct(TranslatorHelper $translatorHelper)
    {
        $this->translatorHelper = $translatorHelper;
    }

    public function trans($message, array $arguments = array(), $domain = "messages")
    {
        return $this->translatorHelper->trans($message, $arguments, $domain);
    }

    public function transchoice($message, $count, array $arguments = array(), $domain = "messages")
    {
        return $this->translatorHelper->transChoice($message, $count, array_merge(array('%count%' => $count), $arguments), $domain);
    }
}
<commit_msg>Following new signature of Twig translator helper<commit_after><?php

namespace Knp\Bundle\TranslatorBundle\Templating\Twig;

use Symfony\Bridge\Twig\Extension\TranslationExtension as BaseTranslationExtension;
use Knp\Bundle\TranslatorBundle\Templating\Helper\TranslatorHelper;

/**
 * Provides integration of the Translation component with Twig.
 *
 * @author <NAME> <<EMAIL>>
 */
class TranslationExtension extends BaseTranslationExtension
{
    private $translatorHelper;

    public function __construct(TranslatorHelper $translatorHelper)
    {
        $this->translatorHelper = $translatorHelper;
    }

    public function trans($message, array $arguments = array(), $domain = 'messages', $locale = null)
    {
        return $this->translatorHelper->trans($message, $arguments, $domain);
    }

    public function transchoice($message, $count, array $arguments = array(), $domain = 'messages', $locale = null)
    {
        return $this->translatorHelper->transChoice($message, $count, array_merge(array('%count%' => $count), $arguments), $domain);
    }
}

{'fraction_non_alphanumeric': 0.12306201550387597, 'fraction_numerical': 0.0, 'mean_word_length': 4.7202216066482, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '512848', 'n_tokens_mistral': 580, 'n_tokens_neox': 567, 'n_words': 130}