<commit_before><?php

namespace Clevis\PushNotifications\DI;

use Clevis\PushNotifications\Device\Types;
use Nette\DI\CompilerExtension;


class PushNotificationsExtension extends CompilerExtension
{

	public function loadConfiguration()
	{
		$builder = $this->getContainerBuilder();

		$config = $this->getConfig($this->defaults);

		$builder->addDefinition($this->prefix('android.c2dm'))
			->setClass('Clevis\PushNotifications\Services\OS\AndroidNotification')
			->setArguments(array(
				$config['android.c2dm.username'],
				$config['android.c2dm.password'],
				$config['android.c2dm.source'],
			));

		$builder->addDefinition($this->prefix('android.gcm'))
			->setClass('Clevis\PushNotifications\Services\OS\AndroidGCMNotification')
			->setArguments(array(
				$config['android.gcm.apiKey'],
				$config['android.gcm.useMultiCurl'],
			));

		$builder->addDefinition($this->prefix('apple'))
			->setClass('Clevis\PushNotifications\Services\OS\AppleNotification')
			->setArguments(array(
				$config['android.apple.sandbox'],
				$config['android.apple.pem'],
				$config['android.apple.passphrase'],
			));

		$builder->addDefinition($this->prefix('microsoft'))
			->setClass('Clevis\PushNotifications\Services\OS\MicrosoftNotification');

		$builder->addDefinition($this->prefix('service'))
			->setClass('Clevis\PushNotifications\Service\Notifications')
			->addSetup('addHandler', array(Types::OS_ANDROID_C2DM, $this->prefix('@android.c2dm')))
			->addSetup('addHandler', array(Types::OS_ANDROID_C2DM, $this->prefix('@android.gcm')))
			->addSetup('addHandler', array(Types::OS_IOS, $this->prefix('@apple')))
			->addSetup('addHandler', array(Types::OS_MAC, $this->prefix('@apple')))
			->addSetup('addHandler', array(Types::OS_WINDOWSMOBILE, $this->prefix('@microsoft')))
			->addSetup('addHandler', array(Types::OS_WINDOWSPHONE, $this->prefix('@microsoft')));

	}

}
<commit_msg>fix extension defaults<commit_after><?php

namespace Clevis\PushNotifications\DI;

use Clevis\PushNotifications\Device\Types;
use Nette\DI\CompilerExtension;


class PushNotificationsExtension extends CompilerExtension
{

	public function loadConfiguration()
	{
		$builder = $this->getContainerBuilder();

		$config = $this->getConfig([
			'android.gcm.useMultiCurl' => TRUE,
		]);

		$builder->addDefinition($this->prefix('android.c2dm'))
			->setClass('Clevis\PushNotifications\Services\OS\AndroidNotification')
			->setArguments(array(
				$config['android.c2dm.username'],
				$config['android.c2dm.password'],
				$config['android.c2dm.source'],
			));

		$builder->addDefinition($this->prefix('android.gcm'))
			->setClass('Clevis\PushNotifications\Services\OS\AndroidGCMNotification')
			->setArguments(array(
				$config['android.gcm.apiKey'],
				$config['android.gcm.useMultiCurl'],
			));

		$builder->addDefinition($this->prefix('apple'))
			->setClass('Clevis\PushNotifications\Services\OS\AppleNotification')
			->setArguments(array(
				$config['android.apple.sandbox'],
				$config['android.apple.pem'],
				$config['android.apple.passphrase'],
			));

		$builder->addDefinition($this->prefix('microsoft'))
			->setClass('Clevis\PushNotifications\Services\OS\MicrosoftNotification');

		$builder->addDefinition($this->prefix('service'))
			->setClass('Clevis\PushNotifications\Service\Notifications')
			->addSetup('addHandler', array(Types::OS_ANDROID_C2DM, $this->prefix('@android.c2dm')))
			->addSetup('addHandler', array(Types::OS_ANDROID_C2DM, $this->prefix('@android.gcm')))
			->addSetup('addHandler', array(Types::OS_IOS, $this->prefix('@apple')))
			->addSetup('addHandler', array(Types::OS_MAC, $this->prefix('@apple')))
			->addSetup('addHandler', array(Types::OS_WINDOWSMOBILE, $this->prefix('@microsoft')))
			->addSetup('addHandler', array(Types::OS_WINDOWSPHONE, $this->prefix('@microsoft')));

	}

}

{'fraction_non_alphanumeric': 0.1896551724137931, 'fraction_numerical': 0.0036572622779519333, 'mean_word_length': 6.238185255198488, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 69, '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': '3833784', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1217, 'n_words': 118}