<commit_before><?php

namespace Qafeen\Aadhaar;

use App\User;
use GuzzleHttp\Client;
use Illuminate\Http\Request;

/**
 * Aadhaar Validation entry point.
 *
 * @package Qafeen\Aadhaar
 */
class Aadhaar
{
    /**
     * Demographic url
     *
     * @type string
     */
    const DEMOGRAPHIC_URL = 'http://192.168.3.113:9090/auth/raw/';

    /**
     * OTP url
     *
     * @type string
     */
    const OTP_URL = 'http://172.16.58.3:9090/otp/';

    /**
     * Guzzle client to communicate with aadhaar bridge api
     *
     * @var \GuzzleHttp\Client;
     */
    protected $client;

    /**
     * Aadhaar bridge configuration
     *
     * @var array|bool
     */
    protected $config;

    /**
     * @var \Illuminate\Http\Request
     */
    protected $request;

    public function __construct(Client $client, Request $request)
    {
        $this->client = $client;

        $this->request = $request;

        $this->config = config('aadhaar') ?: require __DIR__.'/../config.php';
    }

    public function isValid()
    {
        $options = [
            'aadhaar-id' => $this->request['aadhaarId'],
            'location'   => [
                'type'    => 'pincode',
                'pincode' => $this->request['pincode'],
            ],
            'modality'         => $this->config['modality'],
            'certificate-type' => $this->config['certificate-type'],
            'demographics'     => [<commit_msg>Applied fixes from StyleCI<commit_after><?php

namespace Qafeen\Aadhaar;

use App\User;
use GuzzleHttp\Client;
use Illuminate\Http\Request;

/**
 * Aadhaar Validation entry point.
 */
class Aadhaar
{
    /**
     * Demographic url.
     *
     * @var string
     */
    const DEMOGRAPHIC_URL = 'http://139.59.30.133:9090/auth/raw/';

    /**
     * OTP url.
     *
     * @var string
     */
    const OTP_URL = 'http://172.16.58.3:9090/otp/';

    /**
     * Guzzle client to communicate with aadhaar bridge api.
     *
     * @var \GuzzleHttp\Client;
     */
    protected $client;

    /**
     * Aadhaar bridge configuration.
     *
     * @var array|bool
     */
    protected $config;

    /**
     * @var \Illuminate\Http\Request
     */
    protected $request;

    public function __construct(Client $client, Request $request)
    {
        $this->client = $client;

        $this->request = $request;

        $this->config = config('aadhaar') ?: require __DIR__.'/../config.php';
    }

    public function isValid()
    {
        $options = [
            'aadhaar-id' => $this->request['aadhaarId'],
            'location'   => [
                'type'    => 'pincode',
                'pincode' => $this->request['pincode'],
            ],
            'modality'         => $this->config['modality'],
            'certificate-type' => $this->config['certificate-type'],
            'demographics'     => [
{'fraction_non_alphanumeric': 0.156436338126973, 'fraction_numerical': 0.01823921431076815, 'mean_word_length': 1.8153998025666338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4690571', 'n_tokens_mistral': 986, 'n_tokens_neox': 935, 'n_words': 169}