public function offsetSet($key, $value)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException('The name of the macro must be a string.');
        }

        if (!is_callable($value)) {
            throw new InvalidArgumentException('The macro must be a callable value.');
        }

        $this->macros[$key] = $value;
    }