<commit_before><?php

namespace Mpociot\VatCalculator\Http;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Response;
use Mpociot\VatCalculator\Exceptions\VATCheckUnavailableException;
use Mpociot\VatCalculator\VatCalculator;

class Controller extends BaseController
{
    /**
     * @var VatCalculator
     */
    private $calculator;

    public function __construct(VatCalculator $calculator)
    {
        $this->calculator = $calculator;
    }

    /**
     * Returns the tax rate for the given country code and postal code.
     *
     * @return \Illuminate\Http\Response
     */<commit_msg>Fix VAT Calculator JS returns zero tax for business country code<commit_after><?php

namespace Mpociot\VatCalculator\Http;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Response;
use Mpociot\VatCalculator\Exceptions\VATCheckUnavailableException;
use Mpociot\VatCalculator\VatCalculator;

class Controller extends BaseController
{
    /**
     * @var VatCalculator
     */
    private $calculator;

    public function __construct()
    {
        $config = resolve('Illuminate\Contracts\Config\Repository');
        $this->calculator = new \Mpociot\VatCalculator\VatCalculator($config);
    }

    /**
     * Returns the tax rate for the given country code and postal code.
     *
     * @return \Illuminate\Http\Response
     */
{'fraction_non_alphanumeric': 0.09047292666209733, 'fraction_numerical': 0.0, 'mean_word_length': 3.6202531645569622, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4415949', 'n_tokens_mistral': 450, 'n_tokens_neox': 444, 'n_words': 98}