<commit_before><?php 

/**
 * Part of the SqlI package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the 3-clause BSD License.
 *
 * This source file is subject to the 3-clause BSD License that is
 * bundled with this package in the LICENSE file.  It is also available at
 * the following URL: http://www.opensource.org/licenses/BSD-3-Clause
 *
 * @package    SqlI
 * @version    0.1.0
 * @author     <NAME> @ PragmaRX
 * @license    BSD License (3-clause)
 * @copyright  (c) 2013, PragmaRX
 * @link       http://pragmarx.com
 */

namespace PragmaRX\SqlI\Vendor\Laravel;

use PragmaRX\SqlI\SqlI;
use PragmaRX\SqlI\Support\DatabaseConnection;
use PragmaRX\SqlI\Support\Statement;
use PragmaRX\SqlI\Support\WorkingDirectory;
use PragmaRX\SqlI\Support\SqlInteractive;

use PragmaRX\Support\Config;
use PragmaRX\Support\Filesystem;

use Symfony\Component\Finder\Finder;

use PragmaRX\SqlI\Vendor\Laravel\Artisan\Select as SelectCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Delete as DeleteCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Insert as InsertCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Update as UpdateCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Sql    as SqlCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\SqlI   as SqlICommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Tables as TablesCommand;

use PragmaRX\Support\ServiceProvider as PragmaRXServiceProvider;

class ServiceProvider extends PragmaRXServiceProvider {

	/**
	 * The package vendor name (lower case).
	 *
	 * @var string
	 */
	protected $packageVendor = 'pragmarx';

	/**
	 * The package vendor name in caps.
	 *
	 * @var string
	 */
	protected $packageVendorCapitalized = 'PragmaRX';

	/**
	 * The package name (lower case).
	 *
	 * @var string
	 */
	protected $packageName = 'select';

	/**
	 * The package name (capitalized).
	 *
	 * @var string
	 */
	protected $packageNameCapitalized = 'Select';

	/**
	 * This is the boot method for this ServiceProvider
	 *
	 * @return void
	 */
	public function wakeUp()
	{

	}

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

		$this->registerSelectCommand();
		$this->registerDeleteCommand();
		$this->registerInsertCommand();
		$this->registerUpdateCommand();
		$this->registerSqlCommand();
		$this->registerSqlICommand();
		$this->registerTablesCommand();

		$this->registerSelect();

		$this->commands('select.select.command');
		$this->commands('select.delete.command');
		$this->commands('select.insert.command');
		$this->commands('select.update.command');
		$this->commands('select.sql.command');
		$this->commands('select.sqli.command');
		$this->commands('select.tables.command');
	}

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

	/**
	 * Takes all the components of Select and glues them
	 * together to create Select.
	 *
	 * @return void
	 */
	private function registerSelect()
	{
		$this->app['select'] = $this->app->share(function($app)
		{
			$app['select.loaded'] = true;

			$database = new DatabaseConnection($app['db']);

			return new SqlI(
				$database,
				new Statement(new WorkingDirectory),
				new SqlInteractive($database, $app['select.sqli.command'])
			);
		});
	}

	/**
	 * Register the Select Artisan command
	 *
	 * @return void
	 */ 
	private function registerSelectCommand()
	{
		$this->app['select.select.command'] = $this->app->share(function($app)
		{
			return new SelectCommand();
		});
	}

	/**
	 * Register the Delete Artisan command
	 *
	 * @return void
	 */ 
	private function registerDeleteCommand()<commit_msg>inject config into database connection<commit_after><?php 

/**
 * Part of the SqlI package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the 3-clause BSD License.
 *
 * This source file is subject to the 3-clause BSD License that is
 * bundled with this package in the LICENSE file.  It is also available at
 * the following URL: http://www.opensource.org/licenses/BSD-3-Clause
 *
 * @package    SqlI
 * @version    0.1.0
 * @author     <NAME> @ PragmaRX
 * @license    BSD License (3-clause)
 * @copyright  (c) 2013, PragmaRX
 * @link       http://pragmarx.com
 */

namespace PragmaRX\SqlI\Vendor\Laravel;

use PragmaRX\SqlI\SqlI;
use PragmaRX\SqlI\Support\DatabaseConnection;
use PragmaRX\SqlI\Support\Statement;
use PragmaRX\SqlI\Support\WorkingDirectory;
use PragmaRX\SqlI\Support\SqlInteractive;

use PragmaRX\Support\Config;
use PragmaRX\Support\Filesystem;

use Symfony\Component\Finder\Finder;

use PragmaRX\SqlI\Vendor\Laravel\Artisan\Select as SelectCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Delete as DeleteCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Insert as InsertCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Update as UpdateCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Sql    as SqlCommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\SqlI   as SqlICommand;
use PragmaRX\SqlI\Vendor\Laravel\Artisan\Tables as TablesCommand;

use PragmaRX\Support\ServiceProvider as PragmaRXServiceProvider;

class ServiceProvider extends PragmaRXServiceProvider {

	/**
	 * The package vendor name (lower case).
	 *
	 * @var string
	 */
	protected $packageVendor = 'pragmarx';

	/**
	 * The package vendor name in caps.
	 *
	 * @var string
	 */
	protected $packageVendorCapitalized = 'PragmaRX';

	/**
	 * The package name (lower case).
	 *
	 * @var string
	 */
	protected $packageName = 'select';

	/**
	 * The package name (capitalized).
	 *
	 * @var string
	 */
	protected $packageNameCapitalized = 'Select';

	/**
	 * This is the boot method for this ServiceProvider
	 *
	 * @return void
	 */
	public function wakeUp()
	{

	}

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

		$this->registerSelectCommand();
		$this->registerDeleteCommand();
		$this->registerInsertCommand();
		$this->registerUpdateCommand();
		$this->registerSqlCommand();
		$this->registerSqlICommand();
		$this->registerTablesCommand();

		$this->registerSelect();

		$this->commands('select.select.command');
		$this->commands('select.delete.command');
		$this->commands('select.insert.command');
		$this->commands('select.update.command');
		$this->commands('select.sql.command');
		$this->commands('select.sqli.command');
		$this->commands('select.tables.command');
	}

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

	/**
	 * Takes all the components of Select and glues them
	 * together to create Select.
	 *
	 * @return void
	 */
	private function registerSelect()
	{
		$this->app['select'] = $this->app->share(function($app)
		{
			$app['select.loaded'] = true;

			$database = new DatabaseConnection($app['db'], $app['config']);

			return new SqlI(
				$database,
				new Statement(new WorkingDirectory),
				new SqlInteractive($database, $app['select.sqli.command'])
			);
		});
	}

	/**
	 * Register the Select Artisan command
	 *
	 * @return void
	 */ 
	private function registerSelectCommand()
	{
		$this->app['select.select.command'] = $this->app->share(function($app)
		{
			return new SelectCommand();
		});
	}

	/**
	 * Register the Delete Artisan command
	 *
	 * @return void
	 */ 
	private function registerDeleteCommand()
{'fraction_non_alphanumeric': 0.13659198913781398, 'fraction_numerical': 0.002987101154107264, 'mean_word_length': 3.789336801040312, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4724816', 'n_tokens_mistral': 2542, 'n_tokens_neox': 2311, 'n_words': 540}