<commit_before><?php

namespace Risan\OAuth1;

use Risan\OAuth1\Request\RequestConfigInterface;

class OAuth1 implements OAuth1Interface
{
    /**
     * The RequestConfigInterface instance.
     *
     * @var \Risan\OAuth1\Request\RequestConfig
     */
    protected $requestConfig;

    /**
     * The HttpClientInterface instance.
     *
     * @var \Risan\OAuth1\HttpClientInterface
     */
    protected $httpClient;

    /**
     * Create a new OAuth1 instance.
     *
     * @param \Risan\OAuth1\Request\RequestConfigInterface $requestConfig
     * @param \Risan\OAuth1\HttpClientInterface $httpClient
     */
    public function __construct(RequestConfigInterface $requestConfig, HttpClientInterface $httpClient)
    {
        $this->requestConfig = $requestConfig;
        $this->httpClient = $httpClient;
    }

    /**
     * {@inheritDoc}
     */
    public function getRequestConfig()
    {
        return $this->requestConfig;
    }

    /**
     * {@inheritDoc}
     */
    public function getHttpClient()
    {
        return $this->httpClient;
    }

    /**
     * {@inheritDoc}
     */
    public function getTemporaryCredentials()
    {
        return $this->httpClient->post($this->requestConfig->getTemporaryCredentialsUrl(), [
            'headers' => [
                'Authorization' => $this->requestConfig->getTemporaryCredentialsAuthorizationHeader(),
            ],
        ]);
    }
}
<commit_msg>:sparkles: Implement getTemporaryCredentials().<commit_after><?php

namespace Risan\OAuth1;

use Risan\OAuth1\Credentials\ClientCredentials;
use Risan\OAuth1\Request\RequestConfigInterface;

class OAuth1 implements OAuth1Interface
{
    /**
     * The RequestConfigInterface instance.
     *
     * @var \Risan\OAuth1\Request\RequestConfig
     */
    protected $requestConfig;

    /**
     * The HttpClientInterface instance.
     *
     * @var \Risan\OAuth1\HttpClientInterface
     */
    protected $httpClient;

    /**
     * Create a new OAuth1 instance.
     *
     * @param \Risan\OAuth1\Request\RequestConfigInterface $requestConfig
     * @param \Risan\OAuth1\HttpClientInterface $httpClient
     */
    public function __construct(RequestConfigInterface $requestConfig, HttpClientInterface $httpClient)
    {
        $this->requestConfig = $requestConfig;
        $this->httpClient = $httpClient;
    }

    /**
     * {@inheritDoc}
     */
    public function getRequestConfig()
    {
        return $this->requestConfig;
    }

    /**
     * {@inheritDoc}
     */
    public function getHttpClient()
    {
        return $this->httpClient;
    }

    /**
     * {@inheritDoc}
     */
    public function getTemporaryCredentials()
    {
        $response = $this->httpClient->post($this->requestConfig->getTemporaryCredentialsUrl(), [
            'headers' => [
                'Authorization' => $this->requestConfig->getTemporaryCredentialsAuthorizationHeader(),
            ],
        ]);

        return ClientCredentials::createFromResponse($response);
    }
}

{'fraction_non_alphanumeric': 0.11739275024941802, 'fraction_numerical': 0.006318589956767542, 'mean_word_length': 2.477456647398844, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '3985394', 'n_tokens_mistral': 851, 'n_tokens_neox': 853, 'n_words': 136}