<commit_before><?php
namespace Edu\Cnm\MlbScout;
require_once ("autoload.php");
/**
 * access level class for MLB scout Capstone
 * @author <NAME> <<EMAIL>>
 */
class AccessLevel implements \JsonSerializable {
	/**
	 * access level id for user; this is the primary key
	 * @var int $accessLevelId
	 */
	private $accessLevelId;
	/**
	 * access level set for user
	 * @var string $accessLevelName
	 */
	private $accessLevelName;
	/**
	 * constructor for this AccessLevel
	 *
	 * @param int $newAccessLevelId new value of access level id
	 * @param string $newAccessLevelName new value of access level name
	 * @throws \InvalidArgumentException if data types are not valid
	 * @throws \RangeException if data values are out of bounds
	 * @throws \TypeError if data types violate type hints
	 * @throws \Exception if some other exception occurs
	 */
	public function __construct(int $newAccessLevelId = null, string $newAccessLevelName) {
		try {
			$this->setAccessLevelId($newAccessLevelId);
			$this->setAccessLevelName($newAccessLevelName);
		} catch(\InvalidArgumentException $invalidArgument) {
			//rethrow exception to the caller
			throw(new \InvalidArgumentException($invalidArgument->getMessage(), 0, $invalidArgument));
		} catch(\RangeException $range) {
			// rethrow the exception to the caller
			throw(new \RangeException($range->getMessage(), 0, $range));
		} catch(\TypeError $typeError) {
			//rethrow the exception to the caller
			throw(new \TypeError($typeError->getMessage(), 0, $typeError));
		} catch(\Exception $exception) {
			// rethrow the exception to the caller
			throw(new \Exception($exception->getMessage(), 0, $exception));
		}
	}
	/**
	 * accessor method for access level id
	 *
	 * @return int|null value of access level id
	 */
	public function getAccessLevelId() {
		return $this->accessLevelId;
	}

	/**
	 * mutator method for access level id
	 * @param int|null $newAccessLevelId new value of access level id
	 * @throws \RangeException if $newAccessLevelId
	 * @throws \TypeError if $newAccessLevelId is not an integer
	 */
	public function setAccessLevelId(int $newAccessLevelId) {
		// base case: if the new access level id is null, this a new access level without a mySQL
		if($newAccessLevelId === null) {
			$this->accessLevelId = null;
			return;
		}
		// verify the access level id is positive
		if($newAccessLevelId <=0) {
			throw(new \RangeException("access level is is not positive"));
		}
		//convert and store the access level id
		$this->accessLevelId = $newAccessLevelId;
	}

	/**
	 * accessor method for access level name
	 * @return string value of access level name
	 */
	public function getAccessLevelName() {
		return $this->accessLevelName;
	}

	/**
	 * mutator method for access level name
	 *
	 * @param string $newAccessLevelName new value of access level name
	 * @throws \InvalidArgumentException if $newAccessLevelName is not a string or insecure
	 * @throws \RangeException if $newAccessLevelName is > 24 characters<commit_msg>removed int on line 62 https://app.asana.com/0/117435671931068/118830311351367<commit_after><?php
namespace Edu\Cnm\MlbScout;
require_once ("autoload.php");
/**
 * access level class for MLB scout Capstone
 * @author <NAME> <<EMAIL>>
 */
class AccessLevel implements \JsonSerializable {
	/**
	 * access level id for user; this is the primary key
	 * @var int $accessLevelId
	 */
	private $accessLevelId;
	/**
	 * access level set for user
	 * @var string $accessLevelName
	 */
	private $accessLevelName;
	/**
	 * constructor for this AccessLevel
	 *
	 * @param int $newAccessLevelId new value of access level id
	 * @param string $newAccessLevelName new value of access level name
	 * @throws \InvalidArgumentException if data types are not valid
	 * @throws \RangeException if data values are out of bounds
	 * @throws \TypeError if data types violate type hints
	 * @throws \Exception if some other exception occurs
	 */
	public function __construct(int $newAccessLevelId = null, string $newAccessLevelName) {
		try {
			$this->setAccessLevelId($newAccessLevelId);
			$this->setAccessLevelName($newAccessLevelName);
		} catch(\InvalidArgumentException $invalidArgument) {
			//rethrow exception to the caller
			throw(new \InvalidArgumentException($invalidArgument->getMessage(), 0, $invalidArgument));
		} catch(\RangeException $range) {
			// rethrow the exception to the caller
			throw(new \RangeException($range->getMessage(), 0, $range));
		} catch(\TypeError $typeError) {
			//rethrow the exception to the caller
			throw(new \TypeError($typeError->getMessage(), 0, $typeError));
		} catch(\Exception $exception) {
			// rethrow the exception to the caller
			throw(new \Exception($exception->getMessage(), 0, $exception));
		}
	}
	/**
	 * accessor method for access level id
	 *
	 * @return int|null value of access level id
	 */
	public function getAccessLevelId() {
		return $this->accessLevelId;
	}

	/**
	 * mutator method for access level id
	 * @param int|null $newAccessLevelId new value of access level id
	 * @throws \RangeException if $newAccessLevelId
	 * @throws \TypeError if $newAccessLevelId is not an integer
	 */
	public function setAccessLevelId($newAccessLevelId) {
		// base case: if the new access level id is null, this a new access level without a mySQL
		if($newAccessLevelId === null) {
			$this->accessLevelId = null;
			return;
		}
		// verify the access level id is positive
		if($newAccessLevelId <=0) {
			throw(new \RangeException("access level is is not positive"));
		}
		//convert and store the access level id
		$this->accessLevelId = $newAccessLevelId;
	}

	/**
	 * accessor method for access level name
	 * @return string value of access level name
	 */
	public function getAccessLevelName() {
		return $this->accessLevelName;
	}

	/**
	 * mutator method for access level name
	 *
	 * @param string $newAccessLevelName new value of access level name
	 * @throws \InvalidArgumentException if $newAccessLevelName is not a string or insecure
	 * @throws \RangeException if $newAccessLevelName is > 24 characters
{'fraction_non_alphanumeric': 0.1027929267889605, 'fraction_numerical': 0.00776731118823335, 'mean_word_length': 4.043333333333333, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 31, 'https://': 1, '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': '5311134', 'n_tokens_mistral': 1865, 'n_tokens_neox': 1673, 'n_words': 607}