<commit_before><?php

namespace Magium\ActiveDirectory;

use League\OAuth2\Client\Provider\AbstractProvider;
use League\OAuth2\Client\Provider\GenericProvider;
use Magium\ActiveDirectory\Delegates\Authorize;
use Magium\ActiveDirectory\Delegates\Receive;
use Magium\Configuration\Config\Repository\ConfigInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Http\Header\Location;
use Zend\Http\PhpEnvironment\Response;
use Zend\Psr7Bridge\Psr7Response;
use Zend\Uri\Uri;

class ActiveDirectory
{

    const CONFIG_CLIENT_ID      = 'authentication/ad/client_id';
    const CONFIG_CLIENT_SECRET  = 'authentication/ad/client_secret';
    const CONFIG_ENABLED        = 'authentication/ad/enabled';
    const CONFIG_RETURN_URL     = 'authentication/ad/return_url';
    const CONFIG_REMAP_HTTPS    = 'authentication/ad/remap_https';

    const SESSION_KEY = '__MAGIUM_AD';

    protected $config;
    protected $returnUrl;
    protected $request;
    protected $response;
    protected $scopes;
    protected $endpointConfig;
    protected $oauthProvider;

    public function __construct(
        ConfigInterface $config,
        ServerRequestInterface $request,
        $returnUrl = null,
        $scopes = 'profile openid email offline_access User.Read',
        ResponseInterface $response = null,
        AbstractProvider $oauthProvider = null,
        EndpointConfig $endpointConfig = null
    )
    {
        $this->config = $config;
        $this->request = $request;
        $this->returnUrl = $returnUrl;
        $this->scopes = $scopes;
        $this->response = $response;
        $this->oauthProvider = $oauthProvider;
        $this->endpointConfig = $endpointConfig;
    }

    /**
     * @param ConfigInterface $config
     */
    public function setConfig($config)
    {
        $this->config = $config;
    }

    public function getConfig()
    {<commit_msg>Updated the constructor to have more typical ordering<commit_after><?php

namespace Magium\ActiveDirectory;

use League\OAuth2\Client\Provider\AbstractProvider;
use League\OAuth2\Client\Provider\GenericProvider;
use Magium\ActiveDirectory\Delegates\Authorize;
use Magium\ActiveDirectory\Delegates\Receive;
use Magium\Configuration\Config\Repository\ConfigInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Http\Header\Location;
use Zend\Http\PhpEnvironment\Response;
use Zend\Psr7Bridge\Psr7Response;
use Zend\Uri\Uri;

class ActiveDirectory
{

    const CONFIG_CLIENT_ID      = 'authentication/ad/client_id';
    const CONFIG_CLIENT_SECRET  = 'authentication/ad/client_secret';
    const CONFIG_ENABLED        = 'authentication/ad/enabled';
    const CONFIG_RETURN_URL     = 'authentication/ad/return_url';
    const CONFIG_REMAP_HTTPS    = 'authentication/ad/remap_https';

    const SESSION_KEY = '__MAGIUM_AD';

    protected $config;
    protected $returnUrl;
    protected $request;
    protected $response;
    protected $scopes;
    protected $endpointConfig;
    protected $oauthProvider;

    public function __construct(
        ConfigInterface $config,
        ServerRequestInterface $request,
        ResponseInterface $response = null,
        $returnUrl = null,
        $scopes = 'profile openid email offline_access User.Read',
        AbstractProvider $oauthProvider = null,
        EndpointConfig $endpointConfig = null
    )
    {
        $this->config = $config;
        $this->request = $request;
        $this->returnUrl = $returnUrl;
        $this->scopes = $scopes;
        $this->response = $response;
        $this->oauthProvider = $oauthProvider;
        $this->endpointConfig = $endpointConfig;
    }

    /**
     * @param ConfigInterface $config
     */
    public function setConfig($config)
    {
        $this->config = $config;
    }

    public function getConfig()
    {
{'fraction_non_alphanumeric': 0.0979381443298969, 'fraction_numerical': 0.002061855670103093, 'mean_word_length': 3.3411633109619685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '3184315', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1113, 'n_words': 223}