Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php
namespace WP_Statistics\Globals;

/**
 * The Context class is a utility for managing a global context using key-value pairs.
 * It allows you to add, update, retrieve, and remove data from a centralized context array.
 * This can be useful for maintaining state or configuration data that needs to be accessed globally.
 */
class Context
{
    /**
     * Store all context data
     *
     * @var array
     */
    protected static $data = [];

    /**
     * Add a value to context.
     * If key exists, it will not overwrite.
     *
     * @param string $key
     * @param mixed $value
     * @return void
     */
    public static function add($key, $value)
    {
        if (!isset(static::$data[$key])) {
            static::$data[$key] = $value;
        }
    }

    /**
     * Update an existing value in context or add if not exists
     *
     * @param string $key
     * @param mixed $value
     * @return void
     */
    public static function update($key, $value)
    {
        static::$data[$key] = $value;
    }

    /**
     * Get a value from context
     *
     * @param string $key
     * @param mixed $default
     * @return mixed
     */
    public static function get($key, $default = null)
    {
        return static::$data[$key]