<commit_before><?php
/**
 * Request - A Facade to the \Http\Request.
 *
 * @author <NAME> - <EMAIL>
 * @version 3.0
 */

namespace Support\Facades;

use Http\Request as HttpRequest;

use ReflectionMethod;
use ReflectionException;


class Request
{
    /**
     * The \Http\Request instance being handled.
     *
     * @var \Validation\Factory|null
     */
    protected static $request;

    /**
     * Return a \Http\Request instance
     *
     * @return \Http\Request
     */
    protected static function getRequest()
    {
        if (isset(static::$request)) {
            return static::$request;
        }

        return static::$request = HttpRequest::createFromGlobals();
    }

    /**
     * Magic Method for calling the methods on the default Request instance.
     *
     * @param $method
     * @param $params
     *
     * @return mixed
     */<commit_msg>Integrate the new Session API on Support\Facades\Request<commit_after><?php
/**
 * Request - A Facade to the \Http\Request.
 *
 * @author <NAME> - <EMAIL>
 * @version 3.0
 */

namespace Support\Facades;

use Http\Request as HttpRequest;
use Support\Facades\Session;

use ReflectionMethod;
use ReflectionException;


class Request
{
    /**
     * The \Http\Request instance being handled.
     *
     * @var \Validation\Factory|null
     */
    protected static $request;

    /**
     * Return a \Http\Request instance
     *
     * @return \Http\Request
     */
    protected static function getRequest()
    {
        if (isset(static::$request)) {
            return static::$request;
        }

        static::$request = $request = HttpRequest::createFromGlobals();

        // Get the Session instance.
        $session = Session::instance();

        $request->setSession($session);

        return $request;
    }

    /**
     * Magic Method for calling the methods on the default Request instance.
     *
     * @param $method
     * @param $params
     *
     * @return mixed
     */
{'fraction_non_alphanumeric': 0.12087353986795328, 'fraction_numerical': 0.002031488065007618, 'mean_word_length': 2.1877022653721685, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, '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': '4873042', 'n_tokens_mistral': 570, 'n_tokens_neox': 564, 'n_words': 153}