<commit_before><?php

require_once 'Cache.php';

class Application_Model_Preference
{
	
	private static function getUserId()
	{
		//called from a daemon process
		if (!class_exists("Zend_Auth", false) || !Zend_Auth::getInstance()->hasIdentity()) {
			$userId = null;
		}
		else {
			$auth = Zend_Auth::getInstance();
			$userId = $auth->getIdentity()->id;
		}
		
		return $userId;
	}
	
    /**
     *
     * @param boolean $isUserValue is true when we are setting a value for the current user
     */
    private static function setValue($key, $value, $isUserValue = false)
    {
    	$cache = new Cache();
    	<commit_msg>CC-5681: I18N: Fail to switch language<commit_after><?php

require_once 'Cache.php';

class Application_Model_Preference
{
	
	private static function getUserId()
	{
		//pass in true so the check is made with the autoloader
		//we need this check because saas calls this function from outside Zend
		if (!class_exists("Zend_Auth", true) || !Zend_Auth::getInstance()->hasIdentity()) {
			$userId = null;
		}
		else {
			$auth = Zend_Auth::getInstance();
			$userId = $auth->getIdentity()->id;
		}
		
		return $userId;
	}
	
    /**
     *
     * @param boolean $isUserValue is true when we are setting a value for the current user
     */
    private static function setValue($key, $value, $isUserValue = false)
    {
    	$cache = new Cache();
    	
{'fraction_non_alphanumeric': 0.1261852662290299, 'fraction_numerical': 0.00437636761487965, 'mean_word_length': 3.2215384615384615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4033229', 'n_tokens_mistral': 470, 'n_tokens_neox': 435, 'n_words': 127}