<commit_before><?php

/**
 * Contao Open Source CMS
 *
 * Copyright (C) 2005-2014 <NAME>
 *
 * @package    TranslationFields
 * @author     <NAME> <https://github.com/icodr8>
 * @license    LGPL
 * @copyright  <NAME> 2013-2014
 */


/**
 * Namespace
 */
namespace TranslationFields;


/**
 * Class TranslationFields
 *
 * @copyright  <NAME> 2013-2014
 * @author     <NAME> <https://github.com/icodr8>
 * @package    translation_fields
 */
class TranslationFields extends \Controller
{

	/**
	 * __construct function.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
	}


	/**
	 * translateValue function.
	 *
	 * @access public
	 * @static
	 * @param mixed $varValue
	 * @return string
	 */
	public static function translateValue($varValue, $strForceLanguage = '')
	{
		$arrLanguages = array();
<commit_msg>added check to translationValue<commit_after><?php

/**
 * Contao Open Source CMS
 *
 * Copyright (C) 2005-2014 <NAME>
 *
 * @package    TranslationFields
 * @author     <NAME> <https://github.com/icodr8>
 * @license    LGPL
 * @copyright  <NAME> 2013-2014
 */


/**
 * Namespace
 */
namespace TranslationFields;


/**
 * Class TranslationFields
 *
 * @copyright  <NAME> 2013-2014
 * @author     <NAME> <https://github.com/icodr8>
 * @package    translation_fields
 */
class TranslationFields extends \Controller
{

	/**
	 * __construct function.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
	}


	/**
	 * translateValue function.
	 *
	 * @access public
	 * @static
	 * @param mixed $varValue
	 * @return string
	 */
	public static function translateValue($varValue, $strForceLanguage = '')
	{
		// Return value if it is already translated
		if (!is_numeric($varValue))
		{
			return $varValue;
		}

		$arrLanguages = array();

{'fraction_non_alphanumeric': 0.14177489177489178, 'fraction_numerical': 0.02813852813852814, 'mean_word_length': 3.1457399103139014, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '2241603', 'n_tokens_mistral': 664, 'n_tokens_neox': 568, 'n_words': 140}