<commit_before><?php namespace Orchestra\Html;

use \Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;

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

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->registerHtmlBuilder();
		$this->registerFormBuilder();
		$this->registerOrchestraFormBuilder();
		$this->registerOrchestraTableBuilder();
		$this->registerAliases();
	}

	/**
	 * Register the HTML builder instance.
	 *
	 * @return void
	 */
	protected function registerHtmlBuilder()
	{
		$this->app['html'] = $this->app->share(function($app)
		{
			return new HtmlBuilder($app['url']);
		});
	}

	/**
	 * Register the form builder instance.
	 *
	 * @return void
	 */
	protected function registerFormBuilder()
	{
		$this->app['form'] = $this->app->share(function($app)
		{
			$form = new \Illuminate\Html\FormBuilder($app['html'], $app['url'], $app['session']->getToken());

			return $form->setSessionStore($app['session']);
		});
	}

	/**
	 * Register the Orchestra\Form builder instance.
	 *
	 * @return void
	 */
	protected function registerOrchestraFormBuilder()
	{
		$this->app['orchestra.form'] = $this->app->share(function($app)
		{
			return new Form\Environment($app);
		});
	}

	/**
	 * Register the Orchestra\Table builder instance.
	 *
	 * @return void
	 */
	protected function registerOrchestraTableBuilder()
	{
		$this->app['orchestra.table'] = $this->app->share(function($app)
		{
			return new Table\Environment($app);
		});
	}
	
	/**
	 * Register aliases.
	 *
	 * @return void
	 */
	protected function registerAliases()
	{
		$this->app->booting(function()
		{
			$loader = AliasLoader::getInstance();
			$loader->alias('Orchestra\Form', 'Orchestra\Support\Facades\Form');
			$loader->alias('Orchestra\Table', 'Orchestra\Support\Facades\Table');
		});
	}
	
	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot()<commit_msg>Minor tweak.<commit_after><?php namespace Orchestra\Html;

use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;

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

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->registerHtmlBuilder();
		$this->registerFormBuilder();
		$this->registerOrchestraFormBuilder();
		$this->registerOrchestraTableBuilder();
		$this->registerAliases();
	}

	/**
	 * Register the HTML builder instance.
	 *
	 * @return void
	 */
	protected function registerHtmlBuilder()
	{
		$this->app['html'] = $this->app->share(function($app)
		{
			return new HtmlBuilder($app['url']);
		});
	}

	/**
	 * Register the form builder instance.
	 *
	 * @return void
	 */
	protected function registerFormBuilder()
	{
		$this->app['form'] = $this->app->share(function($app)
		{
			$form = new \Illuminate\Html\FormBuilder($app['html'], $app['url'], $app['session']->getToken());

			return $form->setSessionStore($app['session']);
		});
	}

	/**
	 * Register the Orchestra\Form builder instance.
	 *
	 * @return void
	 */
	protected function registerOrchestraFormBuilder()
	{
		$this->app['orchestra.form'] = $this->app->share(function($app)
		{
			return new Form\Environment($app);
		});
	}

	/**
	 * Register the Orchestra\Table builder instance.
	 *
	 * @return void
	 */
	protected function registerOrchestraTableBuilder()
	{
		$this->app['orchestra.table'] = $this->app->share(function($app)
		{
			return new Table\Environment($app);
		});
	}

	/**
	 * Register aliases.
	 *
	 * @return void
	 */
	protected function registerAliases()
	{
		$this->app->booting(function()
		{
			$loader = AliasLoader::getInstance();
			$loader->alias('Orchestra\Form', 'Orchestra\Support\Facades\Form');
			$loader->alias('Orchestra\Table', 'Orchestra\Support\Facades\Table');
		});
	}
	
	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot()
{'fraction_non_alphanumeric': 0.16831444417651314, 'fraction_numerical': 0.0, 'mean_word_length': 3.773302646720368, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, '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': '7238138', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1285, 'n_words': 250}