original_string: public function delete($key = null)
      {
          if (!$this->isInitialized()) {
              return false;
          }
  
          if (!isset($key)) {
  
              session_unset();
  
              if (!session_destroy()) {
                  throw new RuntimeException('Failed to delete the session');
              }
  
              return true;
          }
  
          gplcart_array_unset($_SESSION, $key);
          return true;
      }
code: public function delete($key = null)
      {
          if (!$this->isInitialized()) {
              return false;
          }
  
          if (!isset($key)) {
  
              session_unset();
  
              if (!session_destroy()) {
                  throw new RuntimeException('Failed to delete the session');
              }
  
              return true;
          }
  
          gplcart_array_unset($_SESSION, $key);
          return true;
      }
code_tokens: public function delete ( $ key = null ) { if ( ! $ this -> isInitialized ( ) ) { return false ; } if ( ! isset ( $ key ) ) { session_unset ( ) ; if ( ! session_destroy ( ) ) { throw new RuntimeException ( 'Failed to delete the session' ) ; } return true ; } gplcart_array_unset ( $ _SESSION , $ key ) ; return true ; }
docstring: Deletes a data from the session
  @param mixed $key
  @return bool
  @throws RuntimeException
docstring_tokens: Deletes a data from the session