<commit_before><?php namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class InverterServiceProvider extends ServiceProvider {

	/**
	 * Indicates that the loading of this provider is deferred.
	 *
	 * @var bool
	 */
	protected $defer = true;

	/**
	 * Bootstrap any inverter services.
	 *
	 * @return void
	 */
	public function boot()
	{
		//
	}

	/**
	 * Register any inverter services.
	 *
	 * @return void
	 */
	public function register()
	{
		switch (env('INV_DRIVER')) {
			case 'stecagrid':
				$driver = 'StecaGrid';
				break;
		}

		$this->app->singleton('App\Contracts\Inverter', 'App\Services\Inverters\\'.$driver);
	}

	/**
	 * Get the services provided by this provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return ['App\Contracts\Inverter'];
	}

}<commit_msg>Throw an exception if the configured driver does not exist.<commit_after><?php namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class InverterServiceProvider extends ServiceProvider {

	/**
	 * Indicates that the loading of this provider is deferred.
	 *
	 * @var bool
	 */
	protected $defer = true;

	/**
	 * Bootstrap any inverter services.
	 *
	 * @return void
	 */
	public function boot()
	{
		//
	}

	/**
	 * Register any inverter services.
	 *
	 * @return void
	 */
	public function register()
	{
		switch (env('INV_DRIVER')) {
			case 'stecagrid':
				$driver = 'StecaGrid';
				break;

			default:
				$this->app->abort(501, 'Configured driver not supported.');
				break;

		}

		$this->app->singleton('App\Contracts\Inverter', 'App\Services\Inverters\\'.$driver);
	}

	/**
	 * Get the services provided by this provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return ['App\Contracts\Inverter'];
	}

}
{'fraction_non_alphanumeric': 0.13783323879750425, 'fraction_numerical': 0.0017016449234259785, 'mean_word_length': 3.0833333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1677237', 'n_tokens_mistral': 628, 'n_tokens_neox': 552, 'n_words': 144}