<commit_before><?php namespace Illuminate\Redis;

use Closure;
use Predis\Client;
use Illuminate\Contracts\Redis\Database as DatabaseContract;

class Database implements DatabaseContract {

	/**
	 * The host address of the database.
	 *
	 * @var array
	 */
	protected $clients;

	/**
	 * Create a new Redis connection instance.
	 *
	 * @param  array  $servers
	 * @return void
	 */
	public function __construct(array $servers = array())
	{
		$cluster = array_pull($servers, 'cluster');
		$options = (array)array_pull($servers, 'options');

		if ($cluster)
		{
			$this->clients = $this->createAggregateClient($servers, $options);
		}
		else
		{
			$this->clients = $this->createSingleClients($servers, $options);
		}
	}

	/**
	 * Create a new aggregate client supporting sharding.
	 *
	 * @param  array  $servers
	 * @param  array  $options<commit_msg>work on formatting<commit_after><?php namespace Illuminate\Redis;

use Closure;
use Predis\Client;
use Illuminate\Contracts\Redis\Database as DatabaseContract;

class Database implements DatabaseContract {

	/**
	 * The host address of the database.
	 *
	 * @var array
	 */
	protected $clients;

	/**
	 * Create a new Redis connection instance.
	 *
	 * @param  array  $servers
	 * @return void
	 */
	public function __construct(array $servers = array())
	{
		$cluster = array_pull($servers, 'cluster');

		$options = (array) array_pull($servers, 'options');

		if ($cluster)
		{
			$this->clients = $this->createAggregateClient($servers, $options);
		}
		else
		{
			$this->clients = $this->createSingleClients($servers, $options);
		}
	}

	/**
	 * Create a new aggregate client supporting sharding.
	 *
	 * @param  array  $servers
	 * @param  array  $options
{'fraction_non_alphanumeric': 0.13208649912331968, 'fraction_numerical': 0.0, 'mean_word_length': 3.6904109589041094, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3810466', 'n_tokens_mistral': 579, 'n_tokens_neox': 542, 'n_words': 140}