<commit_before><?php namespace Studious\Autologin;

use Illuminate\Support\ServiceProvider;
use Studious\Autologin\Autologin;

class AutologinServiceProvider extends ServiceProvider {

	/**
	 * Indicates if loading of the provider is deferred.
	 *
	 * @var bool
	 */
	protected $defer = false;

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->registerAutologinProvider();
		$this->registerAutologin();
	}

	protected function registerAutologinProvider()
	{
		$this->app['autologin.provider'] = $this->app->share(function($app)
		{
			$provider = $app['config']['studious/autologin::provider'];

			$provider = 'Studious\Autologin\Providers\EloquentAutologinProvider';

			return new $provider;
		});
	}

	protected function registerAutologin()
	{
		$this->app['autologin'] = $this->app->share(function($app)
		{
			return new Autologin($app['config'], $app['url'], $app['autologin.provider']);
		});
	}

	/**
	 * Boot the service provider.
	 * 
	 * @return void
	 */
	public function boot()
	{
		$this->package('studious/autologin');

		include __DIR__.'/../../routes.php';
	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array();
	}

}<commit_msg>Load correct provider from config file<commit_after><?php namespace Studious\Autologin;

use Illuminate\Support\ServiceProvider;
use Studious\Autologin\Autologin;

class AutologinServiceProvider extends ServiceProvider {

	/**
	 * Indicates if loading of the provider is deferred.
	 *
	 * @var bool
	 */
	protected $defer = false;

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->registerAutologinProvider();
		$this->registerAutologin();
	}

	protected function registerAutologinProvider()
	{
		$this->app['autologin.provider'] = $this->app->share(function($app)
		{
			$provider = $app['config']['autologin::provider'];

			return new $provider;
		});
	}

	protected function registerAutologin()
	{
		$this->app['autologin'] = $this->app->share(function($app)
		{
			return new Autologin($app['config'], $app['url'], $app['autologin.provider']);
		});
	}

	/**
	 * Boot the service provider.
	 * 
	 * @return void
	 */
	public function boot()
	{
		$this->package('studious/autologin');

		include __DIR__.'/../../routes.php';
	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array('autologin', 'autologin.provider');
	}

}
{'fraction_non_alphanumeric': 0.15884903429247144, 'fraction_numerical': 0.0, 'mean_word_length': 3.834285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '5211650', 'n_tokens_mistral': 886, 'n_tokens_neox': 803, 'n_words': 170}