<commit_before><?php

namespace Judopay;

use Guzzle\Plugin\Log\LogPlugin;

class Request
{
	protected $configuration;
	protected $client;

	public function __construct(\Judopay\Configuration $configuration)
	{
		$this->configuration = $configuration;
	}

	public function setClient(\Guzzle\Http\Client $client)
	{
		$this->client = $client;

		// Set headers
		$this->client->setDefaultOption(
			'headers',
			array(
				'API-Version' => $this->configuration->get('api_version'),
        		'Accept' => 'application/json; charset=utf-8',
        		'Content-Type' => 'application/json'
			)
		);

		// Use CA cert bundle to verify SSL connection
		$this->client->setDefaultOption('verify', __DIR__.'/../../cert/rapidssl_ca.crt');
		$this->client->setDefaultOption('ssl.certificate_authority', false);

		// Debug logging
		//$this->client->addSubscriber(LogPlugin::getDebugPlugin());
	}

	public function get($resourcePath)
	{
		$endpointUrl = $this->configuration->get('endpoint_url');
		$request = $this->client->get(
			$endpointUrl.'/'.$resourcePath
		);
		$request = $this->setRequestAuthentication($request);<commit_msg>Now Guzzle is using $client-> setSslVerification()<commit_after><?php

namespace Judopay;

use Guzzle\Plugin\Log\LogPlugin;

class Request
{
	protected $configuration;
	protected $client;

	public function __construct(\Judopay\Configuration $configuration)
	{
		$this->configuration = $configuration;
	}

	public function setClient(\Guzzle\Http\Client $client)
	{
		$this->client = $client;

		// Set headers
		$this->client->setDefaultOption(
			'headers',
			array(
				'API-Version' => $this->configuration->get('api_version'),
        		'Accept' => 'application/json; charset=utf-8',
        		'Content-Type' => 'application/json'
			)
		);

		// Use CA cert bundle to verify SSL connection
		$this->client->setSslVerification(__DIR__.'/../../cert/rapidssl_ca.crt');

		// Debug logging
		//$this->client->addSubscriber(LogPlugin::getDebugPlugin());
	}

	public function get($resourcePath)
	{
		$endpointUrl = $this->configuration->get('endpoint_url');
		$request = $this->client->get(
			$endpointUrl.'/'.$resourcePath
		);
		$request = $this->setRequestAuthentication($request);
{'fraction_non_alphanumeric': 0.16380090497737557, 'fraction_numerical': 0.0009049773755656109, 'mean_word_length': 4.177985948477752, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 42, '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': '6239101', 'n_tokens_mistral': 758, 'n_tokens_neox': 691, 'n_words': 121}