<commit_before><?php

/**
 * FreemobileNotificationSender is a great way to add SMS notifications
 * using Free Mobile's API to your PHP projects
 *
 * See testapi.php for a demo
 *
 * @package FreemobileNotificationSender
 * @author <NAME> <<EMAIL>>
 * @access public
 * @version 1.1
 */
class FreemobileNotificationSender {
	/**
	 * Free Mobile API URL, may have to be changed in future versions
	 */
	const api_url = 'https://smsapi.free-mobile.fr/sendmsg';

	/**
	 * Serves to identify the user.
	 * 
	 * @access protected
	 * @var string $_user_id User id
	 */
	protected $_user_id;
	/**
	 * Authentify the user
	 * 
	 * @access protected
	 * @var string $_api_key API key
	 */
	protected $_api_key;

	public function __construct($user_id,$api_key) {
		$this->_user_id = $user_id;
		$this->_api_key = $api_key;

		return $this;
	}

	/**
	 * Sends a message
	 *
	 * @param string $message The message to send
	 * @access public
	 */
	public function sendMessage($message) {
		if (strlen($message) > 160) {
			throw new InvalidArgumentException('Message too long');
		}

		$query = http_build_query(array(
			'user' => $this->_user_id,
			'pass' => $this->_api_key,
			'msg' => $message
		));
		$url = self::api_url.'?'.$query;

		$curl_handler = curl_init();
		curl_setopt($curl_handler,CURLOPT_URL,$url);
		curl_setopt($curl_handler,CURLOPT_POST,false);
		curl_setopt($curl_handler,CURLOPT_RETURNTRANSFER,true);
		curl_setopt($curl_handler,CURLOPT_HEADER,true);
		curl_setopt($curl_handler,CURLOPT_NOBODY,true);
		curl_setopt($curl_handler,CURLOPT_RETURNTRANSFER,1);
		curl_setopt($curl_handler,CURLOPT_SSL_VERIFYPEER,true);
		curl_setopt($curl_handler,CURLOPT_SSL_VERIFYHOST,2);
		curl_setopt($curl_handler,CURLOPT_CAINFO,__DIR__."/freemobile.crt");
		
		if (curl_exec($curl_handler) === false) {
			throw new Exception('Curl error : '.curl_error($curl_handler));
		}
		
		$status = curl_getinfo($curl_handler,CURLINFO_HTTP_CODE);
		curl_close($curl_handler);

		switch ($status) {
		case 200:
			return true;
			break;
<commit_msg>Removing maximum message length limit, fixing issue #2<commit_after><?php

/**
 * FreemobileNotificationSender is a great way to add SMS notifications
 * using Free Mobile's API to your PHP projects
 *
 * See testapi.php for a demo
 *
 * @package FreemobileNotificationSender
 * @author <NAME> <<EMAIL>>
 * @access public
 * @version 1.1
 */
class FreemobileNotificationSender {
	/**
	 * Free Mobile API URL, may have to be changed in future versions
	 */
	const api_url = 'https://smsapi.free-mobile.fr/sendmsg';

	/**
	 * Serves to identify the user.
	 * 
	 * @access protected
	 * @var string $_user_id User id
	 */
	protected $_user_id;
	/**
	 * Authentify the user
	 * 
	 * @access protected
	 * @var string $_api_key API key
	 */
	protected $_api_key;

	public function __construct($user_id,$api_key) {
		$this->_user_id = $user_id;
		$this->_api_key = $api_key;

		return $this;
	}

	/**
	 * Sends a message
	 *
	 * @param string $message The message to send
	 * @access public
	 */
	public function sendMessage($message) {
		$query = http_build_query(array(
			'user' => $this->_user_id,
			'pass' => $this->_api_key,
			'msg' => $message
		));
		$url = self::api_url.'?'.$query;

		$curl_handler = curl_init();
		curl_setopt($curl_handler,CURLOPT_URL,$url);
		curl_setopt($curl_handler,CURLOPT_POST,false);
		curl_setopt($curl_handler,CURLOPT_RETURNTRANSFER,true);
		curl_setopt($curl_handler,CURLOPT_HEADER,true);
		curl_setopt($curl_handler,CURLOPT_NOBODY,true);
		curl_setopt($curl_handler,CURLOPT_RETURNTRANSFER,1);
		curl_setopt($curl_handler,CURLOPT_SSL_VERIFYPEER,true);
		curl_setopt($curl_handler,CURLOPT_SSL_VERIFYHOST,2);
		curl_setopt($curl_handler,CURLOPT_CAINFO,__DIR__."/freemobile.crt");
		
		if (curl_exec($curl_handler) === false) {
			throw new Exception('Curl error : '.curl_error($curl_handler));
		}
		
		$status = curl_getinfo($curl_handler,CURLINFO_HTTP_CODE);
		curl_close($curl_handler);

		switch ($status) {
		case 200:
			return true;
			break;

{'fraction_non_alphanumeric': 0.1325540910221338, 'fraction_numerical': 0.004476498383486694, 'mean_word_length': 4.53232462173315, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, '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': '1860112', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1389, 'n_words': 291}