original_string: public function setKey($key = null)
      {
          if (empty($key)) {
  
              $key = $this->get('private_key');
  
              if (empty($key)) {
                  $key = gplcart_string_random();
                  $this->set('private_key', $key);
              }
  
          } else {
              $this->set('private_key', $key);
          }
  
          return $this->key = $key;
      }
code: public function setKey($key = null)
      {
          if (empty($key)) {
  
              $key = $this->get('private_key');
  
              if (empty($key)) {
                  $key = gplcart_string_random();
                  $this->set('private_key', $key);
              }
  
          } else {
              $this->set('private_key', $key);
          }
  
          return $this->key = $key;
      }
code_tokens: public function setKey ( $ key = null ) { if ( empty ( $ key ) ) { $ key = $ this -> get ( 'private_key' ) ; if ( empty ( $ key ) ) { $ key = gplcart_string_random ( ) ; $ this -> set ( 'private_key' , $ key ) ; } } else { $ this -> set ( 'private_key' , $ key ) ; } return $ this -> key = $ key ; }
docstring: Sets the private key
  @param null|string $key
  @return string
docstring_tokens: Sets the private key