<commit_before><?php

namespace Hasty;

class Session
{
    public static function get($key) {
        if (empty($_SESSION[$key]))
            return null;
        return $_SESSION[$key];
    }

    public static function all()
    {
        return $_SESSION;
    }

    public static function del($key)
    {
        if (empty($_SESSION[$key]))
            return null;
        unset($_SESSION[$key]);
    }

    public static function set($key, $value)
    {
        $_SESSION[$key] = $value;
    }
}<commit_msg>enable to set array to Session<commit_after><?php

namespace Hasty;

class Session
{
    public static function get($key)
    {
        if (empty($_SESSION[$key]))
            return null;
        return $_SESSION[$key];
    }

    public static function all()
    {
        return $_SESSION;
    }

    public static function del($key)
    {
        if (empty($_SESSION[$key]))
            return null;
        unset($_SESSION[$key]);
    }

    public static function set($key, $value = '')
    {
        if (!is_array($key))
            return $_SESSION[$key] = $value;
        foreach ($key as $k => $v)
            $_SESSION[$k] = $v;
    }
}
{'fraction_non_alphanumeric': 0.13695090439276486, 'fraction_numerical': 0.0, 'mean_word_length': 1.9642857142857142, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '2081306', 'n_tokens_mistral': 339, 'n_tokens_neox': 335, 'n_words': 89}