<commit_before><?php

namespace Sarin\Flash;


class Messages
{
	protected $storage;
	protected $key = 'lumen-flash';
	protected $message = [];

    /**
     * Constructor.
     */
    public function __construct()
    {
		// Start session
        if (session_status() == PHP_SESSION_NONE)
            session_start();

		$this->storage = &$_SESSION;

		// Load messages from previous request
        if (isset($this->storage[$this->key]) && is_array($this->storage[$this->key])) {
            $this->message = $this->storage[$this->key];
        }
		// Empty messages
        $this->storage[$this->key] = [];
    }

	/**
     * Add flash message for current request
     *
     * @param string $key The key to store the message under
     * @param mixed  $message Message to show on next request
     */
    public function add($key, $message)
    {
		// Create Array for this key
        if (!isset($this->storage[$this->key][$key])) {<commit_msg>Update Messages.php<commit_after><?php

namespace Sarin\Flash;


class Messages
{
	protected $storage;
	protected $key = 'sarin-flash';
	protected $message = [];

    /**
     * Constructor.
     */
    public function __construct()
    {
		// Start session
        if (session_status() == PHP_SESSION_NONE)
            session_start();

		$this->storage = &$_SESSION;

		// Load messages from previous request
        if (isset($this->storage[$this->key]) && is_array($this->storage[$this->key])) {
            $this->message = $this->storage[$this->key];
        }
		// Empty messages
        $this->storage[$this->key] = [];
    }

	/**
     * Add flash message for current request
     *
     * @param string $key The key to store the message under
     * @param mixed  $message Message to show on next request
     */
    public function add($key, $message)
    {
		// Create Array for this key
        if (!isset($this->storage[$this->key][$key])) {
{'fraction_non_alphanumeric': 0.15073529411764705, 'fraction_numerical': 0.0, 'mean_word_length': 2.469945355191257, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '1951427', 'n_tokens_mistral': 573, 'n_tokens_neox': 550, 'n_words': 147}