<commit_before><?php
/**
 * Mt Gox Trade API Client
 * 
 * History:
 * 
 *		12-Apr-11
 *			First version of the client
 * 
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
 
 
/**
 * Order class for Mt Gox Orders
 *
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
class mtgox_order extends mtgox_base
{
	private $data;

	/**
	 *
	 *
	 * @param  $user username for Mt Gox
	 * @param  $pass password for <PASSWORD>
	 * @param null $data array of data about the order
	 */
	public function __construct ($user, $pass, $data = null)
	{
		$this->user = $user;
		$this->pass = $pass;
		$this->data = $data;
	}
	
	public function __get ($key)
	{
		return isset($this->data[$key]) ? $this->data[$key] : null;
	}

	/**
	 * Cancel the order over the API
	 * @return bool true on success
	 */
	public function cancel ()
	{
		return is_array($this->_post('cancelOrder.php', array('oid' => $this->data['oid'], 'type' => $this->data['type'])));
	}
}

/**
 * Mt Gox Trade API implementation
 *
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
class mtgox extends mtgox_base
{
	/**
	 * @param string $user username
	 * @param string $pass password
	 */
	public function __construct ($user, $pass)
	{
		$this->user = $user;
		$this->pass = $pass;
	}

	/**<commit_msg>Minor update<commit_after><?php
/**
 * Mt Gox Trade API Client
 * 
 * History:
 * 
 *		12-Apr-11
 *			First version of the client
 * 
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
 
 
/**
 * Order class for Mt Gox Orders
 *
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
class mtgox_order extends mtgox_base
{
	private $data;

	/**
	 *
	 *
	 * @param  $user username for Mt Gox
	 * @param  $pass password for Mt Gox
	 * @param null $data array of data about the order
	 */
	public function __construct ($user, $pass, $data = null)
	{
		$this->user = $user;
		$this->pass = $pass;
		$this->data = $data;
	}
	
	public function __get ($key)
	{
		return isset($this->data[$key]) ? $this->data[$key] : null;
	}

	/**
	 * Is this a sell order?
	 * @return bool
	 */
	public function is_sell_order ()
	{
		return $this->data['type'] === self::SELL_ORDER;
	}

	/**
	 * Is this a buy order?
	 * @return bool
	 */
	public function is_buy_order ()
	{
		return $this->data['type'] === self::BUY_ORDER;
	}

	/**
	 * Cancel the order over the API
	 * @return bool true on success
	 */
	public function cancel ()
	{
		return is_array($this->_post('cancelOrder.php', array('oid' => $this->data['oid'], 'type' => $this->data['type'])));
	}
}

/**
 * Mt Gox Trade API implementation
 *
 * @author <NAME> <<EMAIL>>
 * @copyright UKD1 Limited 2011
 * @license licence.txt ISC license
 * @see https://www.mtgox.com/support/tradeAPI
 * @see https://github.com/ukd1/Mt-Gox-Trade-API-PHP-Client
 */
class mtgox extends mtgox_base
{
	/**
	 * @param string $user username
	 * @param string $pass password
	 */
	public function __construct ($user, $pass)
	{
		$this->user = $user;
		$this->pass = $pass;
	}

	/**
{'fraction_non_alphanumeric': 0.1710455764075067, 'fraction_numerical': 0.011796246648793566, 'mean_word_length': 3.206313416009019, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 48, 'https://': 12, 'lorem ipsum': 0, 'www.': 6, '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': '6215220', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1343, 'n_words': 342}