<commit_before><?php
class Mailinator {
	private $token;
	private $apiEndpoint = "https://api.mailinator.com/api/";
	private $inboxCount = 0;
	
	public function __construct($token) {
		$this->token = $token;
	}
	
	private function call($method,$params) {
		$params['token'] = $this->token;
		$params_str = $this->paramsToString($params);
		$url = $this->apiEndpoint.$method."?".$params_str;
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		$exec = curl_exec($ch);
		$info = curl_getinfo($ch);
		if($info["http_code"] == 200) {
			curl_close($ch);
			return json_decode($exec,true);
		} else {
			die("An error happened");
		}
	}
	
	private function paramsToString($params = array()) {
		$str = "";
		foreach($params as $key=>$val) {
			$str .= $key."=".$val."&";
		}
		return rtrim($str, "&");
	}
	
	public function fetchInbox($inbox) {
		$query = $this->call('inbox',array('to' => $inbox));
		$mailbox = $query["messages"];
		$this->inboxCount = count($mailbox);
		return $mailbox;
	}
	
	public function fetchMail($msgId) {
		$query = $this->call('email',array('id' => $msgId));
		$message = $query["data"];
		var_dump($message);
	}
}

?><commit_msg>Update Mailinator.php<commit_after><?php
class Mailinator
{
	private $token;
	private $apiEndpoint = "https://api.mailinator.com/api/";
	private $inboxCount = 0;
	
	public function __construct($token)
	{
		$this->token = $token;
	}
	
	private function call($method, $params)
	{
		$params['token'] = $this->token;
		$params_str = $this->paramsToString($params);
		$url = $this->apiEndpoint.$method."?".$params_str;
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		$exec = curl_exec($ch);
		$info = curl_getinfo($ch);
		if($info["http_code"] == 200)
		{
			curl_close($ch);
			return json_decode($exec,true);
		}
		else
		{
			die("An error happened");
		}
	}
	
	private function paramsToString($params = array())
	{
		$str = "";
		foreach($params as $key=>$val)
		{
			$str .= $key."=".$val."&";
		}
		return rtrim($str, "&");
	}
	
	public function fetchInbox($inbox)
	{
		$query = $this->call('inbox',array('to' => $inbox));
		$mailbox = $query["messages"];
		$this->inboxCount = count($mailbox);
		return $mailbox;
	}
	
	public function fetchMail($msgId)
	{
		$query = $this->call('email',array('id' => $msgId));
		$message = $query["data"];
		var_dump($message);
	}
}

?>
{'fraction_non_alphanumeric': 0.20239938080495357, 'fraction_numerical': 0.0030959752321981426, 'mean_word_length': 4.511727078891258, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '7506463', 'n_tokens_mistral': 1071, 'n_tokens_neox': 958, 'n_words': 166}