<commit_before><?php

/* Router                                 */
/* by <NAME> <<EMAIL>> */
/* http://bencrowder.net/coding/router    */

class Router {
	public static function route($url, $routes, $defaultHandler) {
		$found = false;

		// go through each route and see if it matches; if so, execute the handler
		foreach ($routes as $handler) {
			$pattern = array_search($handler, $routes);

			if (preg_match($pattern, $url, $matches)) {
				call_user_func($handler, array_slice($matches, 1));
				$found = true;<commit_msg>Got rid of extraneous array_search() line, thanks to <NAME><commit_after><?php

/* Router                                 */
/* by <NAME> <<EMAIL>> */
/* http://bencrowder.net/coding/router    */

class Router {
	public static function route($url, $routes, $defaultHandler) {
		$found = false;

		// go through each route and see if it matches; if so, execute the handler
		foreach ($routes as $pattern=>$handler) {
			if (preg_match($pattern, $url, $matches)) {
				call_user_func($handler, array_slice($matches, 1));
				$found = true;
{'fraction_non_alphanumeric': 0.150093808630394, 'fraction_numerical': 0.001876172607879925, 'mean_word_length': 3.026415094339623, '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': '7438597', 'n_tokens_mistral': 356, 'n_tokens_neox': 329, 'n_words': 96}