<commit_before><?php
/**
 * Twig translation extension
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */

namespace Skeleton\I18n\Template\Twig\Extension;

class Tigron extends \Twig_Extensions_Extension_I18n {
	/**
	 * Returns the token parser instances to add to the existing list.
	 *
	 * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
	 */
	public function getTokenParsers() {
		return [new TokenParser()];
	}

	/**
	 * Returns a list of filters to add to the existing list.
	 *
	 * @return array An array of filters
	 */
	public function getFilters() {
		$translation_filter = new \Twig_SimpleFilter('trans', function (\Twig_Environment $env, $string) {
			$globals = $env->getGlobals();
			$translation = $globals['env']['translation'];
			return Translation::translate($string, $translation);
		}, ['needs_environment' => true]);
		return [<commit_msg>The translation class isn't in the current namespace<commit_after><?php
/**
 * Twig translation extension
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */

namespace Skeleton\I18n\Template\Twig\Extension;

class Tigron extends \Twig_Extensions_Extension_I18n {
	/**
	 * Returns the token parser instances to add to the existing list.
	 *
	 * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
	 */
	public function getTokenParsers() {
		return [new TokenParser()];
	}

	/**
	 * Returns a list of filters to add to the existing list.
	 *
	 * @return array An array of filters
	 */
	public function getFilters() {
		$translation_filter = new \Twig_SimpleFilter('trans', function (\Twig_Environment $env, $string) {
			$globals = $env->getGlobals();
			$translation = $globals['env']['translation'];
			return \Skeleton\I18n\Translation::translate($string, $translation);
		}, ['needs_environment' => true]);
		return [
{'fraction_non_alphanumeric': 0.1285563751317176, 'fraction_numerical': 0.005268703898840885, 'mean_word_length': 4.504347826086956, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '7553236', 'n_tokens_mistral': 601, 'n_tokens_neox': 553, 'n_words': 165}