<commit_before><?php
namespace mifan\net;

use mifan\util\Collection;

class Request {
    public $url;
    public $base;
    public $method;
    public $referrer;
    public $ip;
    public $ajax;
    public $scheme;
    public $user_agent;
    public $type;
    public $length;
    public $query;
    public $data;
    public $cookie;
    public $session;
    public $files;
    public $secure;
    public $accept;

    public function __construct(array $config = array()) {
        if (empty($config)) {
            $config = array(
                "url" => self::getVar("REQUEST_URI", "/"),
                "base" => dirname(self::getVar("SCRIPT_NAME")),
                "method" => self::getMethod(),
                "referrer" => self::getVar("HTTP_REFERER"),
                "ip" => self::getVar("REMOTE_ADDR"),
                "ajax" => self::getVar("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest",
                "scheme" => self::getVar("SERVER_PROTOCOL", "HTTP/1.1"),
                "user_agent" => self::getVar("HTTP_USER_AGENT"),
                "type" => self::getVar("CONTENT_TYPE"),
                "length" => self::getVar("CONTENT_LENGTH", 0),
                "query" => new Collection($_GET),
                "data" => new Collection($_POST),
                "cookie" => new Collection($_COOKIE),
                "session" => isset($_SESSION) ? new Collection($_SESSION) : new Collection(),
                "files" => new Collection($_FILES),
                "secure" => self::getVar("HTTPS", "off") != "off",
                "accept" => self::getVar("HTTP_ACCEPT"),
            );
        }

        $this->init($config);
    }

    public function init($properties = array()) {<commit_msg>remove session<commit_after><?php
namespace mifan\net;

use mifan\util\Collection;

class Request {
    public $url;
    public $base;
    public $method;
    public $referrer;
    public $ip;
    public $ajax;
    public $scheme;
    public $user_agent;
    public $type;
    public $length;
    public $query;
    public $data;
    public $cookie;
    public $session;
    public $files;
    public $secure;
    public $accept;

    public function __construct(array $config = array()) {
        if (empty($config)) {
            $config = array(
                "url" => self::getVar("REQUEST_URI", "/"),
                "base" => dirname(self::getVar("SCRIPT_NAME")),
                "method" => self::getMethod(),
                "referrer" => self::getVar("HTTP_REFERER"),
                "ip" => self::getVar("REMOTE_ADDR"),
                "ajax" => self::getVar("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest",
                "scheme" => self::getVar("SERVER_PROTOCOL", "HTTP/1.1"),
                "user_agent" => self::getVar("HTTP_USER_AGENT"),
                "type" => self::getVar("CONTENT_TYPE"),
                "length" => self::getVar("CONTENT_LENGTH", 0),
                "query" => new Collection($_GET),
                "data" => new Collection($_POST),
                "cookie" => new Collection($_COOKIE),
                "files" => new Collection($_FILES),
                "secure" => self::getVar("HTTPS", "off") != "off",
                "accept" => self::getVar("HTTP_ACCEPT"),
            );
        }

        $this->init($config);
    }

    public function init($properties = array()) {
{'fraction_non_alphanumeric': 0.16330827067669174, 'fraction_numerical': 0.0018045112781954887, 'mean_word_length': 2.1171508903467666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '5178026', 'n_tokens_mistral': 1001, 'n_tokens_neox': 960, 'n_words': 199}