<commit_before><?php
/**
 * Fuel
 *
 * Fuel is a fast, lightweight, community driven PHP5 framework.
 *
 * @package		Fuel
 * @version		1.0
 * @author		Fuel Development Team
 * @license		MIT License
 * @copyright	2010 <NAME>
 * @link		http://fuelphp.com
 */

/**
 * Loads in a core class and optionally an app class override if it exists.
 *
 * @param	string	$path
 * @param	string	$folder
 * @return	void
 */
if ( ! function_exists('import'))
{
	function import($path, $folder = 'classes')
	{
		$path = str_replace('/', DS, $path);
		require_once COREPATH.$folder.DS.$path.'.php';

		if (is_file(APPPATH.$folder.DS.$path.'.php'))
		{
			require_once APPPATH.$folder.DS.$path.'.php';
		}
	}
}


// Get the start time and memory for use later
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());

define('DS', DIRECTORY_SEPARATOR);
define('CRLF', sprintf('%s%s', chr(13), chr(10)));

( ! is_dir($app_path) and is_dir(DOCROOT.$app_path)) and $app_path = DOCROOT.$app_path;
( ! is_dir($core_path) and is_dir(DOCROOT.$core_path)) and $core_path = DOCROOT.$core_path;
( ! is_dir($package_path) and is_dir(DOCROOT.$package_path)) and $package_path = DOCROOT.$package_path;

define('APPPATH', realpath($app_path).DS);
define('PKGPATH', realpath($package_path).DS);
define('COREPATH', realpath($core_path).DS);

// save a bit of memory by unsetting the path array
unset($app_path, $package_path);

// If the user has added a base.php to their app load it


import('fuel');

( ! class_exists('Fuel')) and class_alias('Fuel\\Core\\Fuel', 'Fuel');

/**
 * Do we have access to mbstring?
 * We need this in order to work with UTF-8 strings
 */
define('MBSTRING', function_exists('mb_get_info'));

/**
 * Is the request being made via AJAX?
 */
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

/**
 * Is Fuel being run in the command line?
 */
define('IS_CLI', defined('STDIN'));



if ( ! function_exists('logger'))
{
	function logger($level, $msg, $method = null)
	{
		if (Config::get('profiling'))
		{
			if ($level == \Fuel::L_ERROR)
			{
				\Console::logError($method.' - '.$msg);
			}
			else
			{
				\Console::log($method.' - '.$msg);
			}
		}
		if ($level > \Config::get('log_threshold'))
		{<commit_msg>To log errors in profiler it requires an exception, so disabled this functionality.<commit_after><?php
/**
 * Fuel
 *
 * Fuel is a fast, lightweight, community driven PHP5 framework.
 *
 * @package		Fuel
 * @version		1.0
 * @author		Fuel Development Team
 * @license		MIT License
 * @copyright	2010 <NAME>
 * @link		http://fuelphp.com
 */

/**
 * Loads in a core class and optionally an app class override if it exists.
 *
 * @param	string	$path
 * @param	string	$folder
 * @return	void
 */
if ( ! function_exists('import'))
{
	function import($path, $folder = 'classes')
	{
		$path = str_replace('/', DS, $path);
		require_once COREPATH.$folder.DS.$path.'.php';

		if (is_file(APPPATH.$folder.DS.$path.'.php'))
		{
			require_once APPPATH.$folder.DS.$path.'.php';
		}
	}
}


// Get the start time and memory for use later
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());

define('DS', DIRECTORY_SEPARATOR);
define('CRLF', sprintf('%s%s', chr(13), chr(10)));

( ! is_dir($app_path) and is_dir(DOCROOT.$app_path)) and $app_path = DOCROOT.$app_path;
( ! is_dir($core_path) and is_dir(DOCROOT.$core_path)) and $core_path = DOCROOT.$core_path;
( ! is_dir($package_path) and is_dir(DOCROOT.$package_path)) and $package_path = DOCROOT.$package_path;

define('APPPATH', realpath($app_path).DS);
define('PKGPATH', realpath($package_path).DS);
define('COREPATH', realpath($core_path).DS);

// save a bit of memory by unsetting the path array
unset($app_path, $package_path);

// If the user has added a base.php to their app load it


import('fuel');

( ! class_exists('Fuel')) and class_alias('Fuel\\Core\\Fuel', 'Fuel');

/**
 * Do we have access to mbstring?
 * We need this in order to work with UTF-8 strings
 */
define('MBSTRING', function_exists('mb_get_info'));

/**
 * Is the request being made via AJAX?
 */
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

/**
 * Is Fuel being run in the command line?
 */
define('IS_CLI', defined('STDIN'));



if ( ! function_exists('logger'))
{
	function logger($level, $msg, $method = null)
	{
		if (Config::get('profiling'))
		{
			\Console::log($method.' - '.$msg);
		}
		if ($level > \Config::get('log_threshold'))
		{
{'fraction_non_alphanumeric': 0.17436440677966103, 'fraction_numerical': 0.005084745762711864, 'mean_word_length': 4.60688836104513, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2051299', 'n_tokens_mistral': 1763, 'n_tokens_neox': 1668, 'n_words': 406}