<commit_before><?php
/**
 * @author: KentProjects <<EMAIL>>
 * @license: Copyright KentProjects
 * @link: http://kentprojects.com
 */
define("APPLICATION_PATH", __DIR__);
date_default_timezone_set("Etc/UTC");
setlocale(LC_ALL, "en_GB.UTF8");

$_SERVER["PATH_INFO"] = empty($_SERVER["PATH_INFO"]) ? "/" : $_SERVER["PATH_INFO"];

require_once __DIR__ . "/exceptions.php";

/**
 * Register the autoloader so we can call on classes when we feel like it!
 */
spl_autoload_register(
/**
 * @param string $class
 * @return bool
 */
	function ($class)
	{
		$file = str_replace("_", "/", strtolower($class)) . ".php";
		$filename = null;

		/**
		 * If the word "Controller_" exists at the beginning of this class, handle it.
		 */
		if (strpos($class, "Controller_") === 0)
		{
			$filename = APPLICATION_PATH . "/controllers/" . str_replace("controller/", "", $file);
		}
		/**
		 * If the word "Model_" exists at the beginning of this class, handle it.
		 */
		elseif (strpos($class, "Model_") === 0)
		{
			$filename = APPLICATION_PATH . "/models/" . str_replace("model/", "", $file);
		}
		/**
		 * If the word "Intent_" exists at the beginning of this class, handle it.
		 */
		elseif (strpos($class, "Intent_") === 0)
		{
			$filename = APPLICATION_PATH . "/intents/" . str_replace("intent_", "", strtolower($class)) . ".php";
		}
		/**
		 * If the word "_Map" exists in this class, handle it.
		 * Checking to see if "Map" exists in general will make this function quicker for other classes!
		 */
		elseif (($class != "ModelMap") && (strpos($class, "Map") !== false) && (strpos($class, "Map") === (strlen($class) - 3)))
		{
			$filename = APPLICATION_PATH . "/models/maps/" . str_replace("_", "", strtolower($class)) . ".php";
		}
		/**
		 * If the word "Permissions" exists in this class, handle it.
		 * Checking to see if "Permissions" exists in general will make this function quicker for other classes!
		 */
		elseif ((strpos($class, "Permissions") !== false) && (strpos($class, "Permissions") === (strlen($class) - 11)))
		{
			$filename = APPLICATION_PATH . "/models/permissions/" . str_replace("_", "", strtolower($class)) . ".php";
		}
		/**
		 * Else this is a generic class in a folder, so go find it!
		 */
		else
		{
			$folders = array(
				APPLICATION_PATH . "/classes",
				APPLICATION_PATH . "/system",
				APPLICATION_PATH . "/vendor"<commit_msg>Why this wasn't like this seems beyond me.<commit_after><?php
/**
 * @author: KentProjects <<EMAIL>>
 * @license: Copyright KentProjects
 * @link: http://kentprojects.com
 */
define("APPLICATION_PATH", __DIR__);
date_default_timezone_set("Etc/UTC");
setlocale(LC_ALL, "en_GB.UTF8");

$_SERVER["PATH_INFO"] = empty($_SERVER["PATH_INFO"]) ? "/" : $_SERVER["PATH_INFO"];

require_once __DIR__ . "/exceptions.php";

/**
 * Register the autoloader so we can call on classes when we feel like it!
 */
spl_autoload_register(
/**
 * @param string $class
 * @return bool
 */
	function ($class)
	{
		$file = str_replace("_", "/", strtolower($class)) . ".php";
		$filename = null;

		/**
		 * If the word "Controller_" exists at the beginning of this class, handle it.
		 */
		if (strpos($class, "Controller_") === 0)
		{
			$filename = APPLICATION_PATH . "/controllers/" . str_replace("controller/", "", $file);
		}
		/**
		 * If the word "Model_" exists at the beginning of this class, handle it.
		 */
		elseif (strpos($class, "Model_") === 0)
		{
			$filename = APPLICATION_PATH . "/models/" . str_replace("model/", "", $file);
		}
		/**
		 * If the word "Intent_" exists at the beginning of this class, handle it.
		 */
		elseif (strpos($class, "Intent_") === 0)
		{
			$filename = APPLICATION_PATH . "/intents/" . str_replace("intent_", "", strtolower($class)) . ".php";
		}
		/**
		 * If the word "_Map" exists in this class, handle it.
		 * Checking to see if "Map" exists in general will make this function quicker for other classes!
		 */
		elseif (($class != "ModelMap") && (strpos($class, "Map") !== false) && (strpos($class, "Map") === (strlen($class) - 3)))
		{
			$filename = APPLICATION_PATH . "/models/maps/" . $file;
		}
		/**
		 * If the word "Permissions" exists in this class, handle it.
		 * Checking to see if "Permissions" exists in general will make this function quicker for other classes!
		 */
		elseif ((strpos($class, "Permissions") !== false) && (strpos($class, "Permissions") === (strlen($class) - 11)))
		{
			$filename = APPLICATION_PATH . "/models/permissions/" . $file;
		}
		/**
		 * Else this is a generic class in a folder, so go find it!
		 */
		else
		{
			$folders = array(
				APPLICATION_PATH . "/classes",
				APPLICATION_PATH . "/system",
				APPLICATION_PATH . "/vendor"
{'fraction_non_alphanumeric': 0.17940483836437593, 'fraction_numerical': 0.00299721687004924, 'mean_word_length': 3.496631376323388, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4281705', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1506, 'n_words': 440}