<commit_before><?php

namespace Ghc\Rosetta\Transformers;

use Money\Currencies\ISOCurrencies;
use Money\Parser\AggregateMoneyParser;
use Money\Parser\DecimalMoneyParser;
use Money\Parser\IntlMoneyParser;

class MoneyValues extends Transformer
{
    /**
     * @var AggregateMoneyParser
     */
    private $moneyParser;

    /**
     * Boot Transformer
     */
    protected function boot()
    {
        $this->addDefaultConfig([
            'locale' => setlocale(LC_ALL, 0),
            'currency_code' => (new \NumberFormatter(setlocale(LC_ALL, 0), \NumberFormatter::CURRENCY))->getTextAttribute(\NumberFormatter::CURRENCY_CODE),
        ]);

        $currencies = new ISOCurrencies();
        $numberFormatter = new \NumberFormatter($this->config['locale'], \NumberFormatter::CURRENCY);
        $intlParser = new IntlMoneyParser($numberFormatter, $currencies);<commit_msg>Fix MoneyValues transformer default locale<commit_after><?php

namespace Ghc\Rosetta\Transformers;

use Money\Currencies\ISOCurrencies;
use Money\Parser\AggregateMoneyParser;
use Money\Parser\DecimalMoneyParser;
use Money\Parser\IntlMoneyParser;

class MoneyValues extends Transformer
{
    /**
     * @var AggregateMoneyParser
     */
    private $moneyParser;

    /**
     * Boot Transformer
     */
    protected function boot()
    {
        $defaultLocale = 'en_US';
        $numberFormatter = new \NumberFormatter($defaultLocale, \NumberFormatter::CURRENCY);

        $this->addDefaultConfig([
            'locale' => $defaultLocale,
            'currency_code' => $numberFormatter->getTextAttribute(\NumberFormatter::CURRENCY_CODE),
        ]);

        $currencies = new ISOCurrencies();
        $intlParser = new IntlMoneyParser($numberFormatter, $currencies);
{'fraction_non_alphanumeric': 0.11677160847166572, 'fraction_numerical': 0.0011448196908986834, 'mean_word_length': 3.528497409326425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '7199279', 'n_tokens_mistral': 518, 'n_tokens_neox': 493, 'n_words': 89}