<commit_before><?php
class commands_UpdateDependencies extends commands_AbstractChangeCommand
{
	/**
	 * @return String
	 */
	function getUsage()
	{
		return "[--forcedownload]";
	}
	
	function getAlias()
	{
		return "upddep";
	}
	
	/**
	 * @return String
	 */
	function getDescription()
	{
		return "Update project dependencies";
	}

	function getOptions()
	{
		return array('forcedownload');
	}
	/**
	 * @param String[] $params
	 * @param array<String, String> $options where the option array key is the option name, the potential option value or true
	 * @see c_ChangescriptCommand::parseArgs($args)
	 */
	function _execute($params, $options)
	{
		$this->message("== Update project dependencies ==");
		$bootstrap = $this->getParent()->getBootStrap();
		$forceDownload = isset($options['forcedownload']);
		do 
		{
			$dependencies = $bootstrap->loadDependencies();
			$downloads = $this->getDepsToDownload($dependencies, $forceDownload);	
			foreach ($downloads as $depsInfos) 
			{
				list($debType, $componentName, $version) = $depsInfos;
				$fullName = $bootstrap->convertToCategory($debType) . '/' . $componentName .'-' . $version;
				
				$this->message('Download ' . $fullName . ' ...');
				try
				{
					$url = null;
					$path = $bootstrap->downloadDependency($debType, $componentName, $version, $url);
				} 
				catch (Exception $e) 
				{
					return $this->quitError('Unable to download : ' . $fullName . ' in local repository. ' . $e->getMessage());
				}
			}
			$forceDownload = false;
		} <commit_msg>[UPDATE] Update command update-dependencies forcedownload option<commit_after><?php
class commands_UpdateDependencies extends commands_AbstractChangeCommand
{
	/**
	 * @return String
	 */
	function getUsage()
	{
		return "[--forcedownload]";
	}
	
	function getAlias()
	{
		return "upddep";
	}
	
	/**
	 * @return String
	 */
	function getDescription()
	{
		return "Update project dependencies";
	}

	function getOptions()
	{
		return array('forcedownload');
	}
	

	/**
	 * @param String[] $params
	 * @param array<String, String> $options where the option array key is the option name, the potential option value or true
	 * @see c_ChangescriptCommand::parseArgs($args)
	 */
	function _execute($params, $options)
	{
		$this->message("== Update project dependencies ==");
		$bootstrap = $this->getParent()->getBootStrap();
		$forceDownload = isset($options['forcedownload']);
		do 
		{
			$dependencies = $bootstrap->loadDependencies();
			$downloads = $this->getDepsToDownload($dependencies, $forceDownload);	
			foreach ($downloads as $depsInfos) 
			{
				list($debType, $componentName, $version) = $depsInfos;
				$fullName = $bootstrap->convertToCategory($debType) . '/' . $componentName .'-' . $version;
				
				$this->message('Download ' . $fullName . ' ...');
				try
				{
					$url = null;
					$path = $bootstrap->downloadDependency($debType, $componentName, $version, $url);
				} 
				catch (Exception $e) 
				{
					if ($forceDownload && $dependencies[$debType][$componentName]['localy'])
					{
						$this->warnMessage('Unable to Download : ' . $fullName . ' in local repository. ' . $e->getMessage());
					}
					else
					{
						return $this->quitError('Unable to Download : ' . $fullName . ' in local repository. ' . $e->getMessage());
					}
				}
			}
			$forceDownload = false;
		} 
{'fraction_non_alphanumeric': 0.15786314525810324, 'fraction_numerical': 0.0, 'mean_word_length': 3.5223880597014925, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 27, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3854064', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1014, 'n_words': 225}