<commit_before><?php
/**
 * YiiInitTask class file.
 *
 * @author <NAME> <<EMAIL>>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2011 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

require_once 'phing/Task.php';
require_once 'phing/tasks/system/PropertyTask.php';

/**
 * YiiInitTask initializes a few property values.
 *
 * The following properties are created:
 * <pre>
 * <li>yii.version: the version number of Yii</li>
 * <li>yii.revision: the SVN revision number of Yii</li>
 * <li>yii.winbuild: whether this build is on Windows (true) or not (false)</li>
 * </pre>
 *
 * @author <NAME> <<EMAIL>>
 * @package build.tasks
 * @since 1.0
 */
class YiiInitTask extends PropertyTask
{
	/**
	 * Execute lint check against PhingFile or a FileSet
	 */
	public function main()
	{
		$this->addProperty('yii.version',$this->getYiiVersion());
//		$this->addProperty('yii.revision',$this->getYiiRevision());
		$this->addProperty('yii.revision','unknown');
		$this->addProperty('yii.winbuild', substr(PHP_OS, 0, 3) == 'WIN' ? 'true' : 'false');
		$this->addProperty('yii.release',$this->getYiiRelease());
		$this->addProperty('yii.date',date('M j, Y'));
	}

	/**
	 * @return string Yii version
	 */
	private function getYiiVersion()
	{
		$coreFile=dirname(__FILE__).'/../../framework/YiiBase.php';
		if(is_file($coreFile))
		{
			$contents=file_get_contents($coreFile);
			$matches=array();
			if(preg_match('/public static function getVersion.*?return \'(.*?)\'/ms',$contents,$matches)>0)
				return $matches[1];
		}
		return 'unknown';
	}

	private function getYiiRelease()
	{
		$changelog=dirname(__FILE__).'/../../CHANGELOG';
		if(preg_match('/Version ([\d.a-z]+) .*\d{4}\s/', file_get_contents($changelog), $matches)>0)
			return $matches[1];
		return '0.0.0';
	}<commit_msg>Removed temporary change in the YiiInitTask.php.<commit_after><?php
/**
 * YiiInitTask class file.
 *
 * @author <NAME> <<EMAIL>>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2011 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

require_once 'phing/Task.php';
require_once 'phing/tasks/system/PropertyTask.php';

/**
 * YiiInitTask initializes a few property values.
 *
 * The following properties are created:
 * <pre>
 * <li>yii.version: the version number of Yii</li>
 * <li>yii.revision: the SVN revision number of Yii</li>
 * <li>yii.winbuild: whether this build is on Windows (true) or not (false)</li>
 * </pre>
 *
 * @author <NAME> <<EMAIL>>
 * @package build.tasks
 * @since 1.0
 */
class YiiInitTask extends PropertyTask
{
	/**
	 * Execute lint check against PhingFile or a FileSet
	 */
	public function main()
	{
		$this->addProperty('yii.version',$this->getYiiVersion());
		$this->addProperty('yii.revision',$this->getYiiRevision());
		$this->addProperty('yii.winbuild', substr(PHP_OS, 0, 3) == 'WIN' ? 'true' : 'false');
		$this->addProperty('yii.release',$this->getYiiRelease());
		$this->addProperty('yii.date',date('M j, Y'));
	}

	/**
	 * @return string Yii version
	 */
	private function getYiiVersion()
	{
		$coreFile=dirname(__FILE__).'/../../framework/YiiBase.php';
		if(is_file($coreFile))
		{
			$contents=file_get_contents($coreFile);
			$matches=array();
			if(preg_match('/public static function getVersion.*?return \'(.*?)\'/ms',$contents,$matches)>0)
				return $matches[1];
		}
		return 'unknown';
	}

	private function getYiiRelease()
	{
		$changelog=dirname(__FILE__).'/../../CHANGELOG';
		if(preg_match('/Version ([\d.a-z]+) .*\d{4}\s/', file_get_contents($changelog), $matches)>0)
			return $matches[1];
		return '0.0.0';
	}
{'fraction_non_alphanumeric': 0.19443679427155053, 'fraction_numerical': 0.01101624896722666, 'mean_word_length': 4.302189781021898, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 52, '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': '1433154', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1298, 'n_words': 260}