public function set(string $variableName = null, $variableValue = null, array $expires = ['m' => 1],
                        bool $encrypted = true): Cookie
    {
        if ($variableName === null) {
            throw new BadMethodCallException('Variable name must be specified');
        }

        \setcookie(
            $variableName,
            $encrypted === true ? $variableValue : $variableValue,
            $this->getExpireTime($expires),
            $this->getPath(),
            $this->getDomain(),
            $this->isSecure(),
            $this->isHttpOnly()
        );
        $this->variables[$variableName] = $variableValue;

        return static::$instance;
    }