<commit_before><?php
/**
 * Acts as the entry point for serving PHP.Gt applications. Only intended for
 * serving dynamic responses. The webserver should be set up to handle serving
 * static files. When using PHP.Gt's inbuilt server (gtserver), Gateway.php
 * serves static files before instantiating this class.
 * 
 * Go has three responsibilities:
 * 1) Define named constants used across PHP.Gt and its applications.
 * 2) Initialise configuration.
 * 3) Initialise dispatcher, depending on type of request. 
 * 
 * PHP.Gt (http://php.gt)
 * @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
 * @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
 */
namespace Gt\Core;
final class Go {

public function __construct() {
	$this->startTime = microtime();

	$this->defineConstants();
	$this->initialiseConfiguration();
	$this->initialiseDispatcher();<commit_msg>Throw UndefinedVariableException when $_SERVER is not in scope<commit_after><?php
/**
 * Acts as the entry point for serving PHP.Gt applications. Only intended for
 * serving dynamic responses. The webserver should be set up to handle serving
 * static files. When using PHP.Gt's inbuilt server (gtserver), Gateway.php
 * serves static files before instantiating this class.
 * 
 * Go has three responsibilities:
 * 1) Define named constants used across PHP.Gt and its applications.
 * 2) Initialise configuration.
 * 3) Initialise dispatcher, depending on type of request. 
 * 
 * PHP.Gt (http://php.gt)
 * @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
 * @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
 */
namespace Gt\Core;
final class Go {

public function __construct() {
	$this->startTime = microtime();
	if(empty($_SERVER)) {
		throw new \Gt\Core\Exception\UndefinedVariableException(
			"\$_SERVER is not defined. Are you running from cli?");
	}

	$this->defineConstants();
	$this->initialiseConfiguration();
	$this->initialiseDispatcher();
{'fraction_non_alphanumeric': 0.11011459890383657, 'fraction_numerical': 0.012954658694569009, 'mean_word_length': 4.3689839572192515, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2085185', 'n_tokens_mistral': 601, 'n_tokens_neox': 553, 'n_words': 211}