<commit_before><?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
namespace yii;

use yii\base\Exception;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\base\UnknownClassException;
use yii\log\Logger;

/**
 * Gets the application start timestamp.
 */
defined('YII_BEGIN_TIME') or define('YII_BEGIN_TIME', microtime(true));
/**
 * This constant defines the framework installation directory.
 */
defined('YII_PATH') or define('YII_PATH', __DIR__);
/**
 * This constant defines whether the application should be in debug mode or not. Defaults to false.
 */
defined('YII_DEBUG') or define('YII_DEBUG', false);
/**
 * This constant defines in which environment the application is running. Defaults to 'prod', meaning production environment.
 * You may define this constant in the bootstrap script. The value could be 'prod' (production), 'dev' (development), 'test', 'staging', etc.
 */
defined('YII_ENV') or define('YII_ENV', 'prod');
/**
 * Whether the the application is running in production environment
 */
defined('YII_ENV_PROD') or define('YII_ENV_PROD', YII_ENV === 'prod');
/**
 * Whether the the application is running in development environment
 */
defined('YII_ENV_DEV') or define('YII_ENV_DEV', YII_ENV === 'dev');
/**
 * Whether the the application is running in testing environment
 */
defined('YII_ENV_TEST') or define('YII_ENV_TEST', YII_ENV === 'test');

/**
 * This constant defines whether error handling should be enabled. Defaults to true.
 */
defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', true);


/**
 * BaseYii is the core helper class for the Yii framework.
 *
 * Do not use BaseYii directly. Instead, use its child class [[Yii]] where
 * you can customize methods of BaseYii.
 *
 * @author <NAME> <<EMAIL>>
 * @since 2.0
 */
class BaseYii
{
	/**
	 * @var array class map used by the Yii autoloading mechanism.
	 * The array keys are the class names (without leading backslashes), and the array values
	 * are the corresponding class file paths (or path aliases). This property mainly affects
	 * how [[autoload()]] works.
	 * @see import
	 * @see autoload
	 */
	public static $classMap = [];
	/**
	 * @var \yii\console\Application|\yii\web\Application the application instance
	 */
	public static $app;
	/**
	 * @var array registered path aliases
	 * @see getAlias
	 * @see setAlias
	 */
	public static $aliases = ['@yii' => __DIR__];
	/**
	 * @var array initial property values that will be applied to objects newly created via [[createObject]].
	 * The array keys are class names without leading backslashes "\", and the array values are the corresponding
	 * name-value pairs for initializing the created class instances. For example,
	 *
	 * ~~~
	 * [
	 *     'Bar' => [
	 *         'prop1' => 'value1',
	 *         'prop2' => 'value2',
	 *     ],
	 *     'mycompany\foo\Car' => [
	 *         'prop1' => 'value1',
	 *         'prop2' => 'value2',
	 *     ],
	 * ]
	 * ~~~
	 *
	 * @see createObject
	 */
	public static $objectConfig = [];


	/**
	 * @return string the version of Yii framework
	 */
	public static function getVersion()
	{
		return '2.0-dev';
	}

	/**
	 * Imports a set of namespaces.
	 *
	 * By importing a namespace, the method will create an alias for the directory corresponding
	 * to the namespace. For example, if "foo\bar" is a namespace associated with the directory
	 * "path/to/foo/bar", then an alias "@foo/bar" will be created for this directory.
	 *
	 * This method is typically invoked in the bootstrap file to import the namespaces of
	 * the installed extensions. By default, Composer, when installing new extensions, will
	 * generate such a mapping file which can be loaded and passed to this method.
	 *
	 * @param array $namespaces the namespaces to be imported. The keys are the namespaces,
	 * and the values are the corresponding directories.
	 */
	public static function importNamespaces($namespaces)
	{
		foreach ($namespaces as $name => $path) {
			if ($name !== '') {
				$name = trim(strtr($name, ['\\' => '/', '_' => '/']), '/');
				if (is_array($path)) {
					$path = reset($path);
				}
				static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name);
			}
		}
	}

	/**
	 * Translates a path alias into an actual path.
	 *
	 * The translation is done according to the following procedure:
	 *<commit_msg>removed Yii::importNamespaces() in favor of the new yii extension installer.<commit_after><?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
namespace yii;

use yii\base\Exception;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\base\UnknownClassException;
use yii\log\Logger;

/**
 * Gets the application start timestamp.
 */
defined('YII_BEGIN_TIME') or define('YII_BEGIN_TIME', microtime(true));
/**
 * This constant defines the framework installation directory.
 */
defined('YII_PATH') or define('YII_PATH', __DIR__);
/**
 * This constant defines whether the application should be in debug mode or not. Defaults to false.
 */
defined('YII_DEBUG') or define('YII_DEBUG', false);
/**
 * This constant defines in which environment the application is running. Defaults to 'prod', meaning production environment.
 * You may define this constant in the bootstrap script. The value could be 'prod' (production), 'dev' (development), 'test', 'staging', etc.
 */
defined('YII_ENV') or define('YII_ENV', 'prod');
/**
 * Whether the the application is running in production environment
 */
defined('YII_ENV_PROD') or define('YII_ENV_PROD', YII_ENV === 'prod');
/**
 * Whether the the application is running in development environment
 */
defined('YII_ENV_DEV') or define('YII_ENV_DEV', YII_ENV === 'dev');
/**
 * Whether the the application is running in testing environment
 */
defined('YII_ENV_TEST') or define('YII_ENV_TEST', YII_ENV === 'test');

/**
 * This constant defines whether error handling should be enabled. Defaults to true.
 */
defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', true);


/**
 * BaseYii is the core helper class for the Yii framework.
 *
 * Do not use BaseYii directly. Instead, use its child class [[Yii]] where
 * you can customize methods of BaseYii.
 *
 * @author <NAME> <<EMAIL>>
 * @since 2.0
 */
class BaseYii
{
	/**
	 * @var array class map used by the Yii autoloading mechanism.
	 * The array keys are the class names (without leading backslashes), and the array values
	 * are the corresponding class file paths (or path aliases). This property mainly affects
	 * how [[autoload()]] works.
	 * @see import
	 * @see autoload
	 */
	public static $classMap = [];
	/**
	 * @var \yii\console\Application|\yii\web\Application the application instance
	 */
	public static $app;
	/**
	 * @var array registered path aliases
	 * @see getAlias
	 * @see setAlias
	 */
	public static $aliases = ['@yii' => __DIR__];
	/**
	 * @var array initial property values that will be applied to objects newly created via [[createObject]].
	 * The array keys are class names without leading backslashes "\", and the array values are the corresponding
	 * name-value pairs for initializing the created class instances. For example,
	 *
	 * ~~~
	 * [
	 *     'Bar' => [
	 *         'prop1' => 'value1',
	 *         'prop2' => 'value2',
	 *     ],
	 *     'mycompany\foo\Car' => [
	 *         'prop1' => 'value1',
	 *         'prop2' => 'value2',
	 *     ],
	 * ]
	 * ~~~
	 *
	 * @see createObject
	 */
	public static $objectConfig = [];


	/**
	 * @return string the version of Yii framework
	 */
	public static function getVersion()
	{
		return '2.0-dev';
	}

	/**
	 * Translates a path alias into an actual path.
	 *
	 * The translation is done according to the following procedure:
	 *
{'fraction_non_alphanumeric': 0.13055590730657213, 'fraction_numerical': 0.0040521717107762445, 'mean_word_length': 3.634976525821596, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3659525', 'n_tokens_mistral': 2451, 'n_tokens_neox': 2298, 'n_words': 837}