<commit_before><?php namespace JD\Laradit\Auth;

use JD\Laradit\Helpers\APIRequestHelper;
use JD\Laradit\Helpers\OAuthRedditHelper;

class OAuth2
{
    protected $credentials;
    protected $urlProvider;
    protected $state;

    public function __construct(OAuthCredentials $credentials, UrlProvider $urlProvider)
    {
        $this->credentials = $credentials;
        $this->urlProvider = $urlProvider;
        $this->state = null;
    }

    public function authorize()
    {
        $baseUrl = 'https://www.reddit.com/api/v1/authorize';
        $urlAndState = OAuthRedditHelper::getAuthorizeUrlAndState($baseUrl, $this->credentials->getClientId(),
            $this->credentials->getRedirectUri(), 'code', true, ['edit']);

        $url = $urlAndState[0];
        $this->state = $urlAndState[1];

        return OAuthRedditHelper::authorize($url);
    }


}
<commit_msg>no need for url provider so far<commit_after><?php namespace JD\Laradit\Auth;

use JD\Laradit\Helpers\APIRequestHelper;
use JD\Laradit\Helpers\OAuthRedditHelper;

class OAuth2
{
    protected $credentials;
    protected $urlProvider;
    protected $state;

    public function __construct(OAuthCredentials $credentials)
    {
        $this->credentials = $credentials;
        $this->state = null;
    }

    public function authorize()
    {
        $baseUrl = 'https://www.reddit.com/api/v1/authorize';
        $urlAndState = OAuthRedditHelper::getAuthorizeUrlAndState($baseUrl, $this->credentials->getClientId(),
            $this->credentials->getRedirectUri(), 'code', true, ['edit']);

        $url = $urlAndState[0];
        $this->state = $urlAndState[1];

        return OAuthRedditHelper::authorize($url);
    }


}

{'fraction_non_alphanumeric': 0.13388138578978273, 'fraction_numerical': 0.004697592483852026, 'mean_word_length': 3.3139240506329113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1185337', 'n_tokens_mistral': 550, 'n_tokens_neox': 535, 'n_words': 92}