<commit_before><?php

namespace Brick\Money\CurrencyConversion\ExchangeRateProvider;

use Brick\Money\Currency;
use Brick\Money\CurrencyConversion\ExchangeRateProvider;
use Brick\Money\Exception\CurrencyConversionException;

/**
 * Reads exchange rates from a PDO database connection.
 */
class PDOProvider implements ExchangeRateProvider
{
    const TABLE_NAME                  = 'TABLE_NAME';
    const EXCHANGE_RATE_COLUMN_NAME   = 'EXCHANGE_RATE_COLUMN_NAME';
    const SOURCE_CURRENCY_COLUMN_NAME = 'SOURCE_CURRENCY_COLUMN_NAME';
    const TARGET_CURRENCY_COLUMN_NAME = 'TARGET_CURRENCY_COLUMN_NAME';

    /**
     * @var \PDOStatement
     */
    private $statement;

    /**
     * @param \PDO  $pdo
     * @param array $configuration
     *
     * @throws \InvalidArgumentException
     */
    private function __construct(\PDO $pdo, array $configuration)
    {
        $keys = [
            self::TABLE_NAME,
            self::EXCHANGE_RATE_COLUMN_NAME,
            self::SOURCE_CURRENCY_COLUMN_NAME,
            self::TARGET_CURRENCY_COLUMN_NAME
        ];

        foreach ($keys as $key) {
            if (! isset($configuration[$key])) {
                throw new \InvalidArgumentException($key . ' is not configured.');
            }
        }

        $query = sprintf(
            'SELECT %s FROM %s WHERE %s = ? AND %s = ?',
            $configuration[self::EXCHANGE_RATE_COLUMN_NAME],
            $configuration[self::TABLE_NAME],
            $configuration[self::SOURCE_CURRENCY_COLUMN_NAME],
            $configuration[self::TARGET_CURRENCY_COLUMN_NAME]
        );

        $this->statement = $pdo->prepare($query);
    }<commit_msg>Fix PDOProvider constructor: was private<commit_after><?php

namespace Brick\Money\CurrencyConversion\ExchangeRateProvider;

use Brick\Money\Currency;
use Brick\Money\CurrencyConversion\ExchangeRateProvider;
use Brick\Money\Exception\CurrencyConversionException;

/**
 * Reads exchange rates from a PDO database connection.
 */
class PDOProvider implements ExchangeRateProvider
{
    const TABLE_NAME                  = 'TABLE_NAME';
    const EXCHANGE_RATE_COLUMN_NAME   = 'EXCHANGE_RATE_COLUMN_NAME';
    const SOURCE_CURRENCY_COLUMN_NAME = 'SOURCE_CURRENCY_COLUMN_NAME';
    const TARGET_CURRENCY_COLUMN_NAME = 'TARGET_CURRENCY_COLUMN_NAME';

    /**
     * @var \PDOStatement
     */
    private $statement;

    /**
     * @param \PDO  $pdo
     * @param array $configuration
     *
     * @throws \InvalidArgumentException
     */
    public function __construct(\PDO $pdo, array $configuration)
    {
        $keys = [
            self::TABLE_NAME,
            self::EXCHANGE_RATE_COLUMN_NAME,
            self::SOURCE_CURRENCY_COLUMN_NAME,
            self::TARGET_CURRENCY_COLUMN_NAME
        ];

        foreach ($keys as $key) {
            if (! isset($configuration[$key])) {
                throw new \InvalidArgumentException($key . ' is not configured.');
            }
        }

        $query = sprintf(
            'SELECT %s FROM %s WHERE %s = ? AND %s = ?',
            $configuration[self::EXCHANGE_RATE_COLUMN_NAME],
            $configuration[self::TABLE_NAME],
            $configuration[self::SOURCE_CURRENCY_COLUMN_NAME],
            $configuration[self::TARGET_CURRENCY_COLUMN_NAME]
        );

        $this->statement = $pdo->prepare($query);
    }
{'fraction_non_alphanumeric': 0.10234093637454982, 'fraction_numerical': 0.0, 'mean_word_length': 2.642622950819672, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6814099', 'n_tokens_mistral': 1008, 'n_tokens_neox': 1024, 'n_words': 172}