<commit_before><?php
/**
 * @copyright 2015-2016 Contentful GmbH
 * @license   MIT
 */

namespace Contentful;

use Contentful\Log\NullLogger;
use Contentful\Log\StandardTimer;
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Exception\ClientException;
use Contentful\Log\LoggerInterface;
use GuzzleHttp\Psr7;

/**
 * Abstract client for common code for the different clients.
 */
abstract class Client
{
    /**
     * @var GuzzleClient
     */
    private $httpClient;

    /**
     * @var string
     */
    private $baseUri;

    /**
     * @var LoggerInterface
     */
    private $logger;

    /**
     * @var string
     */
    private $api;

    /**
     * Client constructor.
     *
     * @param string          $token
     * @param string          $baseUri
     * @param LoggerInterface $logger
     */
    public function __construct($token, $baseUri, $api, LoggerInterface $logger = null)
    {
        $stack = HandlerStack::create();
        $stack->push(new BearerToken($token));
        $this->logger = $logger ?: new NullLogger();

        $this->api = $api;
        $this->baseUri = $baseUri;
        $this->httpClient = new GuzzleClient([
            'handler' => $stack
        ]);
    }

    /**
     * @param string $method
     * @param string $path<commit_msg>Add missing @param in a docblock<commit_after><?php
/**
 * @copyright 2015-2016 Contentful GmbH
 * @license   MIT
 */

namespace Contentful;

use Contentful\Log\NullLogger;
use Contentful\Log\StandardTimer;
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Exception\ClientException;
use Contentful\Log\LoggerInterface;
use GuzzleHttp\Psr7;

/**
 * Abstract client for common code for the different clients.
 */
abstract class Client
{
    /**
     * @var GuzzleClient
     */
    private $httpClient;

    /**
     * @var string
     */
    private $baseUri;

    /**
     * @var LoggerInterface
     */
    private $logger;

    /**
     * @var string
     */
    private $api;

    /**
     * Client constructor.
     *
     * @param string          $token
     * @param string          $baseUri
     * @param string          $api
     * @param LoggerInterface $logger
     */
    public function __construct($token, $baseUri, $api, LoggerInterface $logger = null)
    {
        $stack = HandlerStack::create();
        $stack->push(new BearerToken($token));
        $this->logger = $logger ?: new NullLogger();

        $this->api = $api;
        $this->baseUri = $baseUri;
        $this->httpClient = new GuzzleClient([
            'handler' => $stack
        ]);
    }

    /**
     * @param string $method
     * @param string $path
{'fraction_non_alphanumeric': 0.12639405204460966, 'fraction_numerical': 0.006691449814126394, 'mean_word_length': 2.242168674698795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2828577', 'n_tokens_mistral': 831, 'n_tokens_neox': 786, 'n_words': 197}