original_string: public function set(string $variableName = null, $variableValue = null): Session
      {
          if ($variableName === null) {
              throw new BadMethodCallException('Variable name must be specified');
          }
          if ($variableName === '_MFREG_') {
              throw new InvalidArgumentException('_MFREG_ variable name is not allowed');
          }
          $_SESSION[$variableName] = \base64_encode(\serialize($variableValue));
          $this->variables[$variableName] = \base64_encode(\serialize($variableValue));
  
          return static::$instance;
      }
code: public function set(string $variableName = null, $variableValue = null): Session
      {
          if ($variableName === null) {
              throw new BadMethodCallException('Variable name must be specified');
          }
          if ($variableName === '_MFREG_') {
              throw new InvalidArgumentException('_MFREG_ variable name is not allowed');
          }
          $_SESSION[$variableName] = \base64_encode(\serialize($variableValue));
          $this->variables[$variableName] = \base64_encode(\serialize($variableValue));
  
          return static::$instance;
      }
code_tokens: public function set ( string $ variableName = null , $ variableValue = null ) : Session { if ( $ variableName === null ) { throw new BadMethodCallException ( 'Variable name must be specified' ) ; } if ( $ variableName === '_MFREG_' ) { throw new InvalidArgumentException ( '_MFREG_ variable name is not allowed' ) ; } $ _SESSION [ $ variableName ] = \ base64_encode ( \ serialize ( $ variableValue ) ) ; $ this -> variables [ $ variableName ] = \ base64_encode ( \ serialize ( $ variableValue ) ) ; return static :: $ instance ; }
docstring: Sets SESSION variable.
  
  @param string|null $variableName
  @param null        $variableValue
  @return Session
docstring_tokens: Sets SESSION variable .