<commit_before><?php

namespace Io\Deepdivedylan\Invitersvp;

/**
 * Invitee RSVP Information
 *
 * Basic container class for RSVP information. Each RSVP contains anti-abuse
 * meta data.
 *
 * @author <NAME> <<EMAIL>>
 * @version 1.0.0
 **/
class Rsvp implements \JsonSerializable {
	use ValidateDate;

	/**
	 * id for this Rsvp; this is the primary key
	 * @var int $rsvpId
	 **/
	private $rsvpId;
	/**
	 * invitee id for this Rsvp; this is foreign key to Invitee
	 * @var int $rsvpInviteeId
	 **/
	private $rsvpInviteeId;
	/**
	 * browser for this Rsvp
	 * @var string $rsvpBrowser
	 **/
	private $rsvpBrowser;
	/**
	 * comment for this Rsvp
	 * @var string $rsvpComment
	 **/
	private $rsvpComment;
	/**
	 * IP address for this Rsvp
	 * @var string $rsvpIpAddress
	 **/
	private $rsvpIpAddress;
	/**
	 * number of people for this Rsvp
	 * @var int $rsvpNumPeople
	 **/
	private $rsvpNumPeople;
	/**
	 * timestamp for this Rsvp
	 * @var \DateTime $rsvpTimestamp
	 **/
	private $rsvpTimestamp;

	public function __construct(int $newRsvpId = null, int $newRsvpInviteeId, string $newRsvpBrowser, string $newRsvpComment = null, string $newRsvpIpAddress, int $newRsvpNumPeople, $newRsvpTimestamp) {

	}

	/**
	 * accessor method for rsvp id
	 *
	 * @return int|null value of rsvp id
	 **/
	public function getRsvpId() {
		return($this->rsvpId);
	}

	/**
	 * mutator method for rsvp id
	 *
	 * @param int|null $newRsvpId new value of rsvp id
	 * @throws \RangeException if $newRsvpId is not positive
	 * @throws \TypeError if $newRsvpId is not an integer
	 **/
	public function setRsvpId(int $newRsvpId = null) {
		// base case: if the rsvp id is null, this a new rsvp without a mySQL assigned id (yet)
		if($newRsvpId === null) {
			$this->rsvpId = null;
			return;
		}

		// verify the rsvp id is positive
		if($newRsvpId <= 0) {
			throw(new \RangeException("rsvp id is not positive"));
		}

		// convert and store the rsvp id
		$this->rsvpId = $newRsvpId;
	}

	/**
	 * accessor method for invitee id
	 *
	 * @return int value of invitee id
	 **/
	public function getRsvpInviteeId() {
		return($this->rsvpInviteeId);
	}

	/**
	 * mutator method for rsvp invitee id
	 *
	 * @param int $newRsvpInviteeId new value of rsvp invitee id
	 * @throws \RangeException if $newRsvpInviteeId is not positive
	 * @throws \TypeError if $newRsvpInviteeId is not an integer
	 **/
	public function setRsvpInviteeId(int $newRsvpInviteeId) {
		// verify the rsvp invitee id is positive
		if($newRsvpInviteeId <= 0) {
			throw(new \RangeException("rsvp invitee id is not positive"));
		}

		// convert and store the rsvp id
		$this->rsvpInviteeId = $newRsvpInviteeId;
	}

	/**
	 * accessor method for rsvp browser
	 *
	 * @return string|null value of rsvp browser
	 **/
	public function getRsvpBrowser() {
		return($this->rsvpBrowser);
	}

	/**
	 * mutator method for rsvp browser
	 *
	 * @param string $newRsvpBrowser new value of rsvp browser
	 * @throws \InvalidArgumentException if $newRsvpBrowser is not a string or insecure
	 * @throws \RangeException if $newRsvpBrowser is > 128 characters
	 * @throws \TypeError if $newRsvpBrowser is not a string
	 **/
	public function setRsvpComment(string $newRsvpBrowser) {
		// verify the rsvp browser is secure
		$newRsvpBrowser = trim($newRsvpBrowser);
		$newRsvpBrowser = filter_var($newRsvpBrowser, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
		if(empty($newRsvpBrowser) === true) {
			throw(new \InvalidArgumentException("rsvp browser is empty or insecure"));
		}

		// verify the rsvp browser will fit in the database
		if(strlen($newRsvpBrowser) > 128) {
			throw(new \RangeException("rsvp browser too large"));
		}

		// store the rsvp browser
		$this->rsvpBrowser = $newRsvpBrowser;
	}

	/**
	 * accessor method for rsvp comment
	 *
	 * @return string|null value of rsvp comment
	 **/
	public function getRsvpComment() {
		return($this->rsvpComment);
	}

	/**
	 * mutator method for rsvp comment
	 *<commit_msg>renamed method :smiley_cat:<commit_after><?php

namespace Io\Deepdivedylan\Invitersvp;

/**
 * Invitee RSVP Information
 *
 * Basic container class for RSVP information. Each RSVP contains anti-abuse
 * meta data.
 *
 * @author <NAME> <<EMAIL>>
 * @version 1.0.0
 **/
class Rsvp implements \JsonSerializable {
	use ValidateDate;

	/**
	 * id for this Rsvp; this is the primary key
	 * @var int $rsvpId
	 **/
	private $rsvpId;
	/**
	 * invitee id for this Rsvp; this is foreign key to Invitee
	 * @var int $rsvpInviteeId
	 **/
	private $rsvpInviteeId;
	/**
	 * browser for this Rsvp
	 * @var string $rsvpBrowser
	 **/
	private $rsvpBrowser;
	/**
	 * comment for this Rsvp
	 * @var string $rsvpComment
	 **/
	private $rsvpComment;
	/**
	 * IP address for this Rsvp
	 * @var string $rsvpIpAddress
	 **/
	private $rsvpIpAddress;
	/**
	 * number of people for this Rsvp
	 * @var int $rsvpNumPeople
	 **/
	private $rsvpNumPeople;
	/**
	 * timestamp for this Rsvp
	 * @var \DateTime $rsvpTimestamp
	 **/
	private $rsvpTimestamp;

	public function __construct(int $newRsvpId = null, int $newRsvpInviteeId, string $newRsvpBrowser, string $newRsvpComment = null, string $newRsvpIpAddress, int $newRsvpNumPeople, $newRsvpTimestamp) {

	}

	/**
	 * accessor method for rsvp id
	 *
	 * @return int|null value of rsvp id
	 **/
	public function getRsvpId() {
		return($this->rsvpId);
	}

	/**
	 * mutator method for rsvp id
	 *
	 * @param int|null $newRsvpId new value of rsvp id
	 * @throws \RangeException if $newRsvpId is not positive
	 * @throws \TypeError if $newRsvpId is not an integer
	 **/
	public function setRsvpId(int $newRsvpId = null) {
		// base case: if the rsvp id is null, this a new rsvp without a mySQL assigned id (yet)
		if($newRsvpId === null) {
			$this->rsvpId = null;
			return;
		}

		// verify the rsvp id is positive
		if($newRsvpId <= 0) {
			throw(new \RangeException("rsvp id is not positive"));
		}

		// convert and store the rsvp id
		$this->rsvpId = $newRsvpId;
	}

	/**
	 * accessor method for invitee id
	 *
	 * @return int value of invitee id
	 **/
	public function getRsvpInviteeId() {
		return($this->rsvpInviteeId);
	}

	/**
	 * mutator method for rsvp invitee id
	 *
	 * @param int $newRsvpInviteeId new value of rsvp invitee id
	 * @throws \RangeException if $newRsvpInviteeId is not positive
	 * @throws \TypeError if $newRsvpInviteeId is not an integer
	 **/
	public function setRsvpInviteeId(int $newRsvpInviteeId) {
		// verify the rsvp invitee id is positive
		if($newRsvpInviteeId <= 0) {
			throw(new \RangeException("rsvp invitee id is not positive"));
		}

		// convert and store the rsvp id
		$this->rsvpInviteeId = $newRsvpInviteeId;
	}

	/**
	 * accessor method for rsvp browser
	 *
	 * @return string|null value of rsvp browser
	 **/
	public function getRsvpBrowser() {
		return($this->rsvpBrowser);
	}

	/**
	 * mutator method for rsvp browser
	 *
	 * @param string $newRsvpBrowser new value of rsvp browser
	 * @throws \InvalidArgumentException if $newRsvpBrowser is not a string or insecure
	 * @throws \RangeException if $newRsvpBrowser is > 128 characters
	 * @throws \TypeError if $newRsvpBrowser is not a string
	 **/
	public function setRsvpBrowser(string $newRsvpBrowser) {
		// verify the rsvp browser is secure
		$newRsvpBrowser = trim($newRsvpBrowser);
		$newRsvpBrowser = filter_var($newRsvpBrowser, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
		if(empty($newRsvpBrowser) === true) {
			throw(new \InvalidArgumentException("rsvp browser is empty or insecure"));
		}

		// verify the rsvp browser will fit in the database
		if(strlen($newRsvpBrowser) > 128) {
			throw(new \RangeException("rsvp browser too large"));
		}

		// store the rsvp browser
		$this->rsvpBrowser = $newRsvpBrowser;
	}

	/**
	 * accessor method for rsvp comment
	 *
	 * @return string|null value of rsvp comment
	 **/
	public function getRsvpComment() {
		return($this->rsvpComment);
	}

	/**
	 * mutator method for rsvp comment
	 *
{'fraction_non_alphanumeric': 0.11125126135216952, 'fraction_numerical': 0.0027749747729566097, 'mean_word_length': 3.5542791499138424, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 29, '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': '1835408', 'n_tokens_mistral': 3033, 'n_tokens_neox': 2772, 'n_words': 822}