<commit_before><?php
/**
 * Output Class; any output goes via this class one way or another
 */
class output {
	/**
	 * Input processed data, output requested type
	 * @todo Integrat Monolog Library
	 * @param void $paramater Data to be returned to the client
	 * @return  null || void Method response when returning data
	 */
	public final function main($paramater = null, $is_valid = true)
	{

		// Just a dump check for now
		// TODO Add in monolog processing for all output actions
		if ($is_valid) {
			echo "$is_valid is false";
			exit;
		}

		//return PHP data
		if (!$paramater->return_type || !$paramater->return_type == null) {
			return $paramater;

		// Return JSON object
		} elseif (strtolower($paramater->return_type) == "json") {
			return json_encode($paramater);

		// Return data dump
		} elseif (strtolower($paramater->return_type) == "dump") {
			echo '<PRE>';
			print_r($parmater);
			echo '</PRE>';
			exit;
		}

		// If all fails, call itself and dump data.
		$paramater->return_type = "dump";
		return $this->ouput($paramater);
	}

	/**
	 * Debug method, interface for monolog
	 * @author <EMAIL>
	 * @since 2013-06-26
	 */
	public final function debugger($paramater)
	{
		echo'<PRE>';
		print_r($paramater);
		echo'</PRE>';
		return true;
	}
}<commit_msg>.,/core/output.php = Method parameter changes.<commit_after><?php
/**
 * Output Class; any output goes via this class one way or another
 */

class output {
	/**
	 * Input processed data, output requested type
	 * @todo Integrat Monolog Library
	 * @param stdClass $paramater [required] Data to be returned to the client
	 * @return null || void Method response when returning data
	 */
	public final function main(stdClass $paramater, $is_valid = true)
	{
		$paramater->return_type = (!isset($paramater->return_type) ? "json" : null);

		//return PHP data
		if (!$paramater->return_type || !$paramater->return_type == null) {
			return $paramater;

		// Return JSON object
		} elseif (strtolower($paramater->return_type) == "json") {
			return json_encode($paramater);

		// Return data dump
		} elseif (strtolower($paramater->return_type) == "dump") {
			echo '<PRE>';
			print_r($parmater);
			echo '</PRE>';
			exit;
		}

		// If all fails, call itself and dump data.
		$paramater->return_type = "dump";
		return $this->ouput($paramater);
	}

	/**
	 * Debug method, interface for monolog
	 * @author <EMAIL>
	 * @since 2013-06-26
	 * @param stdClass $paramater [required] Object to be dump printed.
	 * @return boolean
	 */
	public final function debugger(stdClass $paramater)
	{
		echo'<PRE>';
		print_r($paramater);
		echo'</PRE>';
		return true;
	}
}
{'fraction_non_alphanumeric': 0.1412878787878788, 'fraction_numerical': 0.006060606060606061, 'mean_word_length': 3.5145299145299145, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, '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': '7341898', 'n_tokens_mistral': 929, 'n_tokens_neox': 831, 'n_words': 260}