<commit_before><?php

class cacheConfFactory
{
	const SESSION = 'SESSION';
	const APC = 'APC';
	const LOCAL_MEM_CACHE = 'LOCAL_MEM_CACHE';
	const FILE_SYSTEM = 'FILE_SYSTEM';
	const REMOTE_MEM_CACHE = 'REMOTE_MEM_CACHE';

	static function register($name, $instance)
	{
		self::$cacheInstanceList[$name]=$instance;
	}

	static function getInstance($name)
	{

		$cacheConfRequireArray = array(
			self::SESSION =>  array('sessionConf','sessionConf.php'),
			self::APC => array('apcConf','apcConf.php'),
			self::LOCAL_MEM_CACHE => array('localMemCacheConf','localMemCacheConf.php'),
			self::FILE_SYSTEM => array('fileSystemConf','fileSystemConf.php'),
			self::REMOTE_MEM_CACHE => array('remoteMemCacheConf','remoteMemCacheConf.php'));

		if(!isset(self::$cacheInstanceList[$name]))
		{
			list ($className , $requireFile) = $cacheConfRequireArray[$name];
			$ret = require_once (__DIR__.'/'.$requireFile);
			self::register($name, new $className);
		}
		return self::$cacheInstanceList[$name];
	}
}

<commit_msg>PLAT-8932:code review remarks<commit_after><?php

class cacheConfFactory
{
	const SESSION = 'SESSION';
	const APC = 'APC';
	const LOCAL_MEM_CACHE = 'LOCAL_MEM_CACHE';
	const FILE_SYSTEM = 'FILE_SYSTEM';
	const REMOTE_MEM_CACHE = 'REMOTE_MEM_CACHE';
	private static $cacheInstanceList;

	static function register($name, $instance)
	{
		self::$cacheInstanceList[$name]=$instance;
	}

	static function getInstance($name)
	{

		$cacheConfRequireArray = array(
			self::SESSION =>  array('sessionConf','sessionConf.php'),
			self::APC => array('apcConf','apcConf.php'),
			self::LOCAL_MEM_CACHE => array('localMemCacheConf','localMemCacheConf.php'),
			self::FILE_SYSTEM => array('fileSystemConf','fileSystemConf.php'),
			self::REMOTE_MEM_CACHE => array('remoteMemCacheConf','remoteMemCacheConf.php'));

		if(!isset(self::$cacheInstanceList[$name]))
		{
			list ($className , $requireFile) = $cacheConfRequireArray[$name];
			$ret = require_once (__DIR__.'/'.$requireFile);
			self::register($name, new $className);
		}
		return self::$cacheInstanceList[$name];
	}
}


{'fraction_non_alphanumeric': 0.1628131021194605, 'fraction_numerical': 0.0019267822736030828, 'mean_word_length': 6.471223021582734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '658079', 'n_tokens_mistral': 736, 'n_tokens_neox': 676, 'n_words': 107}