<commit_before><?php
/**
 * Copyright 2016 github.com/noahheck
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace EMysqli;

use mysqli;
use mysqli_stmt;

class EMysqliStmt extends mysqli_stmt
{
	/**
	 * @var E_mysqli $mysqli
	 */
	private $mysqli;

	/**
	 * @var string $queryString - the unchanged query string provided to the constructor
	 */
	public $queryString;

	/**
	 * @var string $fullQuery - the query string with bound parameters interpolated
	 */
	public $fullQuery;

	/**
	 * @var array $boundParams - array of arrays containing values that have been bound to the query as parameters
	 */
	private $boundParams = array();

	/**
	 * The first argument should be an instance of mysqli or descendent. If so, we'll cache it's reference locally to be
	 * able to escape the parameters later. Also, we accept and store the query string.
	 * @param mysqli $mysqli
	 * @param string $query
	 */
	public function __construct(mysqli $mysqli, $query)
	{
		$this->mysqli      = $mysqli;
		$this->queryString = $query;

		parent::__construct($mysqli, $query);
	}

	/**
	 * We overwrite the default bind_param method so we can cache the parameters for our needs later. We also extend
	 * the method to allow binding parameters
	 *
	 * @param string $type
	 * @param mixed $vars
	 */
	public function bind_param($type, &...$vars)
	{
		/**
		 *
		 */
		if ($vars) {
			$types = str_split($type);
			$arg   = 0;

			foreach ($types as $type) {

				$this->boundParams[] = [
					"type"  => $type,
					"value" => &$vars[$arg],
				];

				$arg++;
			}
		}

		return true;
	}
<commit_msg>Update comments<commit_after><?php
/**
 * Copyright 2016 github.com/noahheck
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace EMysqli;

use mysqli;
use mysqli_stmt;

class EMysqliStmt extends mysqli_stmt
{
	/**
	 * @var EMysqli
	 */
	private $mysqli;

	/**
	 * @var string - the unchanged query string provided to the constructor
	 */
	public $queryString;

	/**
	 * @var array - array of arrays containing values that have been bound to the query as parameters
	 */
	private $boundParams = array();

	/**
	 * @var string - the query string with bound parameters interpolated
	 */
	public $fullQuery;

	/**
	 * The first argument should be an instance of mysqli or descendent. If so, we'll cache it's reference locally to be
	 * able to escape the parameters later. Also, we accept and store the query string.
	 * @param mysqli $mysqli
	 * @param string $query
	 */
	public function __construct(mysqli $mysqli, $query)
	{
		$this->mysqli      = $mysqli;
		$this->queryString = $query;

		parent::__construct($mysqli, $query);
	}

	/**
	 * We overwrite the default bind_param method so we can cache the parameters for our needs later. We also extend
	 * the method to allow binding parameters
	 *
	 * @param string $type
	 * @param mixed $vars
	 */
	public function bind_param($type, &...$vars)
	{
		if ($vars) {
			$types = str_split($type);
			$arg   = 0;

			foreach ($types as $type) {

				$this->boundParams[] = [
					"type"  => $type,
					"value" => &$vars[$arg],
				];

				$arg++;
			}
		}

		return true;
	}

{'fraction_non_alphanumeric': 0.10749578211617257, 'fraction_numerical': 0.004338394793926247, 'mean_word_length': 3.204660587639311, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '615558', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1212, 'n_words': 489}