<commit_before><?php

/**
 * An article on MLSsoccer.com
 *
 * This is the class for any of the articles on MLSSoccer.com
 * It contains the text of the article itself, in addition to the author and title
 *
 * @author <NAME> <<EMAIL>>
 */

class Article{
	/**
	 * id for the article; this is the primary key
	 * @var int $articleId
	 */
	private $articleId;
	/**
	 * the author of the article
	 * @var string $author
	 */
	private $author;
	/**
	 * the actual text of the article itself
	 * @var string $text
	 */
	private $text;
	/**
	 * the title of the article
	 * @var string $title
	 */
	private $title;

	/*
	 * accessor method for the articleId
	 *
	 * @return mixed value of article Id
	 */
	public function getArticleId(){
		return ($this->articleId);
	}
}<commit_msg>Finished mutator for article ID<commit_after><?php

/**
 * An article on MLSsoccer.com
 *
 * This is the class for any of the articles on MLSSoccer.com
 * It contains the text of the article itself, in addition to the author and title
 *
 * @author <NAME> <<EMAIL>>
 */

class Article{
	/**
	 * id for the article; this is the primary key
	 * @var int $articleId
	 */
	private $articleId;
	/**
	 * the author of the article
	 * @var string $author
	 */
	private $author;
	/**
	 * the actual text of the article itself
	 * @var string $text
	 */
	private $text;
	/**
	 * the title of the article
	 * @var string $title
	 */
	private $title;

	/*
	 * accessor method for the articleId
	 *
	 * @return mixed value of article Id
	 */
	public function getArticleId(){
		return ($this->articleId);
	}

	/*
	 * mutator method for the articleId
	 *
	 * @param mixed $newArticleId value of article ID
	 * @throws InvalidArgumentException if $newArticleId is not an integer
	 * @throws RangeException if $newArticleId is not positive
	 */
	public function setArticleId($newArticleId){
		//base case; if the new ArticleId is null, this is a new article with no mySQL ID
		if($newArticleId === null){
			$this->articleId = null;
			return;
		}

		//verify that the new ArticleId is a valid integer
		$newArticleId = filter_var($newArticleId, FILTER_VALIDATE_INT);
		if ($newArticleId === false){
			throw(new InvalidArgumentException("Article ID is not a valid integer"));
		}

		//verify that the new ID is positive
		if ($newArticleId <= 0){
			throw(new RangeException("Article ID is not positive"));
		}

		//convert the new ID to an integer and store
		$this->articleId = intval($newArticleId);
	}
}
{'fraction_non_alphanumeric': 0.10931174089068826, 'fraction_numerical': 0.0004048582995951417, 'mean_word_length': 3.20954003407155, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 13, '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': '1645662', 'n_tokens_mistral': 819, 'n_tokens_neox': 732, 'n_words': 302}