<commit_before><?php

require_once 'SwatDB/SwatDB.php';
require_once 'Swat/SwatMessage.php';
require_once 'Admin/pages/AdminObjectEdit.php';
require_once 'Admin/exceptions/AdminNotFoundException.php';
require_once 'CME/CME.php';
require_once 'CME/dataobjects/CMEFrontMatter.php';
require_once 'CME/dataobjects/CMEProvider.php';
require_once 'CME/dataobjects/CMEProviderWrapper.php';
require_once 'CME/dataobjects/CMEEvaluation.php';

/**
 * @package   CME
 * @copyright 2013-2014 silverorange
 * @license   http://www.opensource.org/licenses/mit-license.html MIT License
 */
abstract class CMEFrontMatterEdit extends AdminObjectEdit
{
	// {{{ protected function getUiXml()

	protected function getUiXml()
	{
		return 'CME/admin/components/FrontMatter/edit.xml';
	}

	// }}}
	// {{{ protected function getObjectClass()

	protected function getObjectClass()
	{
		return 'CMEFrontMatter';
	}

	// }}}
	// {{{ protected function getObjectUiValueNames()

	protected function getObjectUiValueNames()
	{
		return array(
			'provider',
			'objectives',
			'review_date',
			'enabled',
		);
	}

	// }}}

	// init phase
	// {{{ protected function initInternal()

	protected function initInternal()
	{
		parent::initInternal();

		// add available providers
		$provider_widget = $this->ui->getWidget('provider');
		foreach ($this->getAvailableProviders() as $provider) {
			$provider_widget->addOption(
				$provider->id,
				$provider->title
			);
		}

		$this->setDefaultValues();
	}

	// }}}
	// {{{ protected function getDefaultProviderShortname()

	/**
	 * @return string the defualt provider shortname. If an empty string is
	 *                returned, the first provider in the list is selected
	 *                by default.
	 */
	protected function getDefaultProviderShortname()
	{<commit_msg>Fix typo.<commit_after><?php

require_once 'SwatDB/SwatDB.php';
require_once 'Swat/SwatMessage.php';
require_once 'Admin/pages/AdminObjectEdit.php';
require_once 'Admin/exceptions/AdminNotFoundException.php';
require_once 'CME/CME.php';
require_once 'CME/dataobjects/CMEFrontMatter.php';
require_once 'CME/dataobjects/CMEProvider.php';
require_once 'CME/dataobjects/CMEProviderWrapper.php';
require_once 'CME/dataobjects/CMEEvaluation.php';

/**
 * @package   CME
 * @copyright 2013-2014 silverorange
 * @license   http://www.opensource.org/licenses/mit-license.html MIT License
 */
abstract class CMEFrontMatterEdit extends AdminObjectEdit
{
	// {{{ protected function getUiXml()

	protected function getUiXml()
	{
		return 'CME/admin/components/FrontMatter/edit.xml';
	}

	// }}}
	// {{{ protected function getObjectClass()

	protected function getObjectClass()
	{
		return 'CMEFrontMatter';
	}

	// }}}
	// {{{ protected function getObjectUiValueNames()

	protected function getObjectUiValueNames()
	{
		return array(
			'provider',
			'objectives',
			'review_date',
			'enabled',
		);
	}

	// }}}

	// init phase
	// {{{ protected function initInternal()

	protected function initInternal()
	{
		parent::initInternal();

		// add available providers
		$provider_widget = $this->ui->getWidget('provider');
		foreach ($this->getAvailableProviders() as $provider) {
			$provider_widget->addOption(
				$provider->id,
				$provider->title
			);
		}

		$this->setDefaultValues();
	}

	// }}}
	// {{{ protected function getDefaultProviderShortname()

	/**
	 * @return string the default provider shortname. If an empty string is
	 *                returned, the first provider in the list is selected
	 *                by default.
	 */
	protected function getDefaultProviderShortname()
	{
{'fraction_non_alphanumeric': 0.13435754189944135, 'fraction_numerical': 0.004469273743016759, 'mean_word_length': 3.9667128987517337, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '7137515', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1108, 'n_words': 223}