<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Model_PermissionKeyCategory extends Object {

	protected static $categories;

	public static function getByID($pkCategoryID) {
		if (!self::$categories) {
			self::populateCategories();
		}

		return self::$categories[$pkCategoryID];
	}

	protected function populateCategories() {
		$db = Loader::db();
		self::$categories = array();
		$r = $db->Execute('select pkCategoryID, pkCategoryHandle, pkgID from PermissionKeyCategories');
		while ($row = $r->FetchRow()) {
			$pkc = new PermissionKeyCategory();
			$pkc->setPropertiesFromArray($row);
			self::$categories[$pkc->getPermissionKeyCategoryID()] = $pkc;
			self::$categories[$pkc->getPermissionKeyCategoryHandle()] = $pkc;
		}
	}
	<commit_msg>Add static declaration to `populateCategories`<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Model_PermissionKeyCategory extends Object {

	protected static $categories;

	public static function getByID($pkCategoryID) {
		if (!self::$categories) {
			self::populateCategories();
		}

		return self::$categories[$pkCategoryID];
	}

	protected static function populateCategories() {
		$db = Loader::db();
		self::$categories = array();
		$r = $db->Execute('select pkCategoryID, pkCategoryHandle, pkgID from PermissionKeyCategories');
		while ($row = $r->FetchRow()) {
			$pkc = new PermissionKeyCategory();
			$pkc->setPropertiesFromArray($row);
			self::$categories[$pkc->getPermissionKeyCategoryID()] = $pkc;
			self::$categories[$pkc->getPermissionKeyCategoryHandle()] = $pkc;
		}
	}
	
{'fraction_non_alphanumeric': 0.15375, 'fraction_numerical': 0.0025, 'mean_word_length': 6.147321428571429, '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': '5037671', 'n_tokens_mistral': 533, 'n_tokens_neox': 488, 'n_words': 97}