<commit_before><?php
/**
 * @package module.dashboard
 */
class dashboard_ListAvailablemodulesService extends BaseService
{
	/**
	 * @var dashboard_ListAvailableModulesService
	 */
	private static $instance;

	/**
	 * @return dashboard_ListAvailableModulesService
	 */
	public static function getInstance()
	{
		if (is_null(self::$instance))
		{
			self::$instance = self::getServiceClassInstance(get_class());
		}
		return self::$instance;
	}

	/**
	 * @return array<list_Item>
	 */
	public final function getItems()
	{
		$items = array();
		
		$user = users_UserService::getInstance()->getCurrentBackEndUser();
		if ($user)
		{		
			$fullAccess = $user->getIsroot();
			$ms = ModuleService::getInstance();
			$ps = f_permission_PermissionService::getInstance();
			foreach ($ms->getModules() as $packageName)
			{
				$moduleName = substr($packageName, 8);
				$module = $ms->getModule($moduleName);
				if ($module->isVisible() && $moduleName != 'dashboard' && ($fullAccess || $ps->hasPermission($user, $packageName . '.Enabled', $module->getRootFolderId())))
				{
					$label = $module->getUILabel();
					$items[$label] = new list_Item($label, $moduleName);
				}
			}
		}
		
		ksort($items);
		return array_values($items);
	}

	/**
	 * @return String
	 */
	public final function getDefaultId()
	{
		return 'website';
	}
}<commit_msg>[REFACTOR] Remove "final" keyword on getItems and getDefaultId methods in dynamic list services.<commit_after><?php
/**
 * @package module.dashboard
 */
class dashboard_ListAvailablemodulesService extends BaseService
{
	/**
	 * @var dashboard_ListAvailableModulesService
	 */
	private static $instance;

	/**
	 * @return dashboard_ListAvailableModulesService
	 */
	public static function getInstance()
	{
		if (is_null(self::$instance))
		{
			self::$instance = self::getServiceClassInstance(get_class());
		}
		return self::$instance;
	}

	/**
	 * @return array<list_Item>
	 */
	public function getItems()
	{
		$items = array();
		
		$user = users_UserService::getInstance()->getCurrentBackEndUser();
		if ($user)
		{		
			$fullAccess = $user->getIsroot();
			$ms = ModuleService::getInstance();
			$ps = f_permission_PermissionService::getInstance();
			foreach ($ms->getModules() as $packageName)
			{
				$moduleName = substr($packageName, 8);
				$module = $ms->getModule($moduleName);
				if ($module->isVisible() && $moduleName != 'dashboard' && ($fullAccess || $ps->hasPermission($user, $packageName . '.Enabled', $module->getRootFolderId())))
				{
					$label = $module->getUILabel();
					$items[$label] = new list_Item($label, $moduleName);
				}
			}
		}
		
		ksort($items);
		return array_values($items);
	}

	/**
	 * @return String
	 */
	public function getDefaultId()
	{
		return 'website';
	}
}
{'fraction_non_alphanumeric': 0.16394038531443111, 'fraction_numerical': 0.0007270083605961468, 'mean_word_length': 4.153558052434457, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '5825130', 'n_tokens_mistral': 982, 'n_tokens_neox': 855, 'n_words': 164}