<commit_before><?php

namespace Parvula\Core\Router;

/**
 * Request
 *
 * @package Parvula
 * @version 0.5.0
 * @since 0.5.0
 * @author <NAME>
 * @license MIT License
 */
class Request
{
	public $body;

	/**
	 * @var string IP address
	 */
	public $ip;

	public $query;

	public  $params;


	/**
	 * Constructor
	 *
	 * @param array $server
	 * @param array $get
	 * @param array $post
	 * @param array $cookie
	 * @param array $files
	 */
	public function __construct(
		array $server,
		array $get,
		array $post,
		array $cookie,
		array $files) {

		// IP
		$this->ip = isset($server['REMOTE_ADDR']) ? $server['REMOTE_ADDR'] : '';

		// Query
		isset($server['QUERY_STRING']) ? parse_str($server['QUERY_STRING'], $this->query) : '';
		$this->query = (object) $this->query;

		// Body
		$this->body = (object) $post;
	}

}<commit_msg>add `uri`, `scheme` and `secureLayer` fields<commit_after><?php

namespace Parvula\Core\Router;

/**
 * Request
 *
 * @package Parvula
 * @version 0.5.0
 * @since 0.5.0
 * @author <NAME>
 * @license MIT License
 */
class Request
{
	public $body;

	/**
	 * @var string IP address
	 */
	public $ip;

	public $query;

	public $params;

	/**
	 * @var string
	 */
	public $uri;

	/**
	 * @var string Scheme (without the `://`)
	 */
	public $scheme;

	/**
	 * @var bool If server use a cryptographic protocol (like TLS/SSL)
	 */
	public $secureLayer;


	/**
	 * Constructor
	 *
	 * @param array $server
	 * @param array $get
	 * @param array $post
	 * @param array $cookie
	 * @param array $files
	 */
	public function __construct(
		array $server,
		array $get,
		array $post,
		array $cookie,
		array $files) {

		// IP
		$this->ip = isset($server['REMOTE_ADDR']) ? $server['REMOTE_ADDR'] : '';

		// Query
		isset($server['QUERY_STRING']) ? parse_str($server['QUERY_STRING'], $this->query) : '';
		$this->query = (object) $this->query;

		$this->host = isset($server['HTTP_HOST']) ? $server['HTTP_HOST'] : '';

		$this->uri = isset($server['REQUEST_URI']) ? $server['REQUEST_URI'] : '';

		// http, https, ...
		$this->scheme = isset($server['REQUEST_SCHEME']) ? $server['REQUEST_SCHEME'] : '';

		$this->secureLayer = isset($server['HTTPS']) ? $server['HTTPS'] === 'on' : false;

		// Body
		$this->body = (object) $post;
	}

}
{'fraction_non_alphanumeric': 0.19443216968625718, 'fraction_numerical': 0.005302695536897923, 'mean_word_length': 3.24765478424015, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '1760142', 'n_tokens_mistral': 883, 'n_tokens_neox': 797, 'n_words': 190}