<commit_before><?php namespace PiekJ\B302Authentication;

use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;

class InstallCommand extends Command {

	/**
	 * The console command name.
	 *
	 * @var string
	 */
	protected $name = 'b302-auth:install';

	/**
	 * The console command description.
	 *
	 * @var string
	 */
	protected $description = 'Installs the authentication packages.';

	/**
	 * Create a new command instance.
	 *
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
	}

	/**
	 * Execute the console command.
	 *
	 * @return mixed
	 */
	public function fire()
	{
		$this->info('Installing lud/club');
		$this->call('club:users-table');
		$this->call('auth:reminders-table');

		$this->info('Installing Zizaco/entrust');
		$this->call('entrust:migration')

		$this->call('migrate');
	}

	/**
	 * Get the console command arguments.
	 *
	 * @return array
	 */
	protected function getArguments()
	{
		return array();
	}

	/**
	 * Get the console command options.
	 *
	 * @return array
	 */
	protected function getOptions()
	{
		return array();
	}

}<commit_msg>Added a default user<commit_after><?php namespace PiekJ\B302Authentication;

use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Zizaco\Entrust\EntrustRole;
use Zizaco\Entrust\EntrustPermission;
use Lud\Club\Club;
use Hash;

class InstallCommand extends Command {

	/**
	 * The console command name.
	 *
	 * @var string
	 */
	protected $name = 'b302-auth:install';

	/**
	 * The console command description.
	 *
	 * @var string
	 */
	protected $description = 'Installs the authentication packages.';

	/**
	 * The model to use to create a admin user.
	 *
	 * @var string
	 */
	private $modelName;

	/**
	 * Create a new command instance.
	 *
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();

		$this->modelName = Club::modelName();
	}

	/**
	 * Execute the console command.
	 *
	 * @return mixed
	 */
	public function fire()
	{
		$this->info('Installing lud/club');
		$this->call('club:users-table');
		$this->call('auth:reminders-table');

		$this->info('Installing Zizaco/entrust');
		$this->call('entrust:migration');

		$this->call('migrate');

		$this->info('Create default admin user with default rights');
		$adminUser = new $this->modelName();
		$adminUser->email = '<EMAIL>';
		$adminUser->password = <PASSWORD>('<PASSWORD>');
		$adminUser->save();

		$adminRole = new EntrustRole();
		$adminRole->name = 'Admin';
		$adminRole->save();

		$adminUser->attachRole($adminRole);

		$manageUsersPermission = new EntrustPermission();
		$manageUsersPermission->name = 'manage_users';
		$manageUsersPermission->display_name = 'Manage Users';
		$manageUsersPermission->save();

		$adminRole->perms()->sync(array($manageUsersPermission->id));
	}

	/**
	 * Get the console command arguments.
	 *
	 * @return array
	 */
	protected function getArguments()
	{
		return array();
	}

	/**
	 * Get the console command options.
	 *
	 * @return array
	 */
	protected function getOptions()
	{
		return array();
	}

}
{'fraction_non_alphanumeric': 0.15391820168591944, 'fraction_numerical': 0.003746487667811427, 'mean_word_length': 3.7537091988130564, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 33, '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': '3432203', 'n_tokens_mistral': 1115, 'n_tokens_neox': 989, 'n_words': 230}