<commit_before><?hh
<<__Native>>
function example_sum(int $a, int $b): int;

<<__Native>>
function hello_world(string $statement): string;

<<__Native>>
function sum_all(array<int> $numberArray): int;<commit_msg>Added basic MongoClient interface per PHP driver. Not sure if syntax etc is correct, but just getting things started!<commit_after><?hh

class MongoClient {

	/* Constants */

	//PHP driver version. May be suffixed with "dev", "+" or "-" if it is in-between versions. 
	const VERSION ; 
	const DEFAULT_HOST = "localhost" ;
	const DEFAULT_PORT = 27017 ;
	const RP_PRIMARY = "primary" ;
	const RP_PRIMARY_PREFERRED = "primaryPreferred" ;
	const RP_SECONDARY = "secondary" ;
	const RP_SECONDARY_PREFERRED = "secondaryPreferred" ;
	const RP_NEAREST = "nearest" ;

	/* Properties */
	public $connected = FALSE ;
	public $status = NULL ;
	protected $server = NULL ;
	protected $persistent = NULL ;

	/* Methods */
	/**
    * @param optional string, optional array
    * @return bool
    */
	public function __construct ($server = "mongodb://localhost:27017", $options = array("connect" => TRUE));
	
	/**
    * @param boolean|string
    * @return bool
    */
	public function close($connection);

	/**
    * @return bool
    */
	public function connect();

	/**
	* @param mixed
    * @return bool
    */
	public function dropDB($db);

	/**
	* @param string
    * @return MongoDB
    */
	public function __get ($dbname);

	/**
    * @return array
    */
	public static function getConnections();

	/**
    * @return array
    */
	public function getHosts ();

	/**
    * @return array
    */
	public function getReadPreference();

	/**
	* @param string, int|MongoInt64
    * @return bool
    */
	public function killCursor($server_hash, $id);

	/**
    * @return array
    */
	public function listDBs();

	/**
	* @param string, string
    * @return MongoCollection
    */
	public function selectCollection($db, $collection);

	/**
	* @param string
    * @return MongoDB
    */
	public function selectDB ($name);

	/**
	* @param string, (optional array)
    * @return bool
    */
	public function setReadPreference ($read_preference, $tags = NULL)

	/**
    * @return bool
    */
	public function __toString();
}
{'fraction_non_alphanumeric': 0.13769751693002258, 'fraction_numerical': 0.005417607223476298, 'mean_word_length': 3.2615384615384615, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, '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': '4766386', 'n_tokens_mistral': 728, 'n_tokens_neox': 690, 'n_words': 196}