<commit_before><?php
namespace Task;
class Task extends \ArticleEntity
{
	private $taskDA;
	private $taskCommentDA;

	private $COMMENTS_PER_PAGE = 5;

	function __construct()
	{
		$this->taskDA = new TaskDA();
	}

	public function setDatabase(\PDO $database)
	{
		$this->taskDA->setDatabase($database);
		parent::setDatabase($database);
	}

	public function loadMembers()
	{
		$tempArrayOfMembers = $this->taskDA->loadMembers($this->getId());
		if($tempArrayOfMembers === false)
		{
			echo "Error"; // Need to implement a nice error
		}else
		{
			$this->article['members'] = $tempArrayOfMembers;
		}
	}

	/**
	 * Loads the amount of comments associated with this Task.
	 *
	 * Will only load from the database if not already loaded or if $forceReload is set to true.
	 *
	 * @param boolean $forceReload
	 */
	public function loadCommentCount() {
		$this->taskCommentDA = new TaskCommentDA();
		$this->taskCommentDA->setDatabase($this->database);
		$returnValue = $this->taskCommentDA->getCommentCount($this->getId());
		if($returnValue['success'])
		{
			$this->article['commentCount'] = $returnValue['data'][0];
		}else
		{
			$this->article['commentCount'] = false;
		}
		unset($this->taskCommentDA);
	}

	//*********SETTERS----------------------
	public function setId($param)
	{
		$this->article['id'] = $param;
	}

	public function setTitle($param)
	{
		$this->article['title'] = $param;
	}

	public function setUpdates($param)
	{
		$this->article['updates'] = $param;
	}

	public function setLastUpdate($param)
	{
		$this->article['lastUpdate'] = $param;
	}

	//*********GETTERS--------------
	public function getThis()
	{
		return($this->article);<commit_msg>Added in a simple hack/fix to Task. Everything still needs to be tested, but it all seems to be working.<commit_after><?php
namespace Task;
class Task extends \ArticleEntity
{
	private $taskDA;
	private $taskCommentDA;

	private $COMMENTS_PER_PAGE = 5;

	function __construct()
	{
		$this->taskDA = new TaskDA();
	}

	public function setDatabase(\PDO $database)
	{
		$this->taskDA->setDatabase($database);
		parent::setDatabase($database);
	}

	public function loadMembers()
	{
		$tempArrayOfMembers = $this->taskDA->loadMembers($this->getId());
		if($tempArrayOfMembers === false)
		{
			echo "Error"; // Need to implement a nice error
		}else
		{
			$this->article['members'] = $tempArrayOfMembers;
		}
	}

	/**
	 * Loads the amount of comments associated with this Task.
	 *
	 * Will only load from the database if not already loaded or if $forceReload is set to true.
	 *
	 * @param boolean $forceReload
	 */
	public function loadCommentCount() {
		$this->taskCommentDA = new TaskCommentDA();
		$this->taskCommentDA->setDatabase($this->database);
		$returnValue = $this->taskCommentDA->getCommentCount($this->getId());
		if($returnValue['success'])
		{
			$this->article['commentCount'] = $returnValue['data'][0];
		}else
		{
			$this->article['commentCount'] = false;
		}
		unset($this->taskCommentDA);
	}

	//*********SETTERS----------------------
	public function setId($param)
	{
		$this->article['id'] = $param;
	}
	
	public function setTimeStamp($param)
	{
		$this->article['time'] = $param;
	}

	public function setTitle($param)
	{
		$this->article['title'] = $param;
	}

	public function setUpdates($param)
	{
		$this->article['updates'] = $param;
	}

	public function setLastUpdate($param)
	{
		$this->article['lastUpdate'] = $param;
	}

	//*********GETTERS--------------
	public function getThis()
	{
		return($this->article);
{'fraction_non_alphanumeric': 0.18329532497149373, 'fraction_numerical': 0.0011402508551881414, 'mean_word_length': 3.894002789400279, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 48, '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': '5300781', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1131, 'n_words': 251}