<commit_before><?php namespace Ipunkt\Subscriptions;

use Illuminate\Support\ServiceProvider;
use Ipunkt\Subscriptions\Plans\PlanRepository;

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

	/**
	 * booting the service
	 */
	public function boot()
	{
		$this->package('ipunkt/subscriptions');

		/** @var \Illuminate\Config\Repository $config */
		$config = $this->app['config'];

		$this->app->bind('Ipunkt\Subscriptions\Plans\PlanRepository', function () use ($config) {
			$repository = new PlanRepository($config->get('subscriptions::plans'));
			$repository->setDefaultPlan($config->get('subscriptions::defaults.plan'));

			return $repository;
		});
	}

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array();
	}
}<commit_msg>Fix SubscriptionsServiceProvider for Laravel 5<commit_after><?php namespace Ipunkt\Subscriptions;

use Illuminate\Support\Facades\Config;
use Illuminate\Support\ServiceProvider;
use Ipunkt\Subscriptions\Plans\PlanRepository;

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

	/**
	 * booting the service
	 */
	public function boot()
	{
		$this->publishes([
		    dirname(dirname(dirname(__FILE__))) . '/config/plans.php' =>  config_path('plans.php'),
		]);


		$this->publishes([
		   dirname(dirname(dirname(__FILE__))) . '/migrations/' => base_path('/database/migrations')
		], 'migrations');


	}

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
        /** @var \Illuminate\Config\Repository $config */
        $plans = config('ipunkt.plans');
        $default_plan = config('ipunkt.defaults');

        $this->app->bind('Ipunkt\Subscriptions\Plans\PlanRepository', function () use($plans,$default_plan)
        {
            $repository = new PlanRepository($plans);
            $repository->setDefaultPlan($default_plan);

            return $repository;
        });

	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array();
	}
}
{'fraction_non_alphanumeric': 0.1444582814445828, 'fraction_numerical': 0.00041511000415110004, 'mean_word_length': 3.4878957169459963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '414034', 'n_tokens_mistral': 763, 'n_tokens_neox': 710, 'n_words': 153}