original_string: public function getUid()
      {
          $session_user_id = $this->user->getId();
  
          if (!empty($session_user_id)) {
              return (string) $session_user_id;
          }
  
          $cookie_name = $this->getCookieUserName();
          $cookie_user_id = $this->request->cookie($cookie_name, '', 'string');
  
          if (!empty($cookie_user_id)) {
              return $cookie_user_id;
          }
  
          $generated_user_id = '_' . gplcart_string_random(6);
          $this->request->setCookie($cookie_name, $generated_user_id, $this->getCookieLifespan());
          return $generated_user_id;
      }
code: public function getUid()
      {
          $session_user_id = $this->user->getId();
  
          if (!empty($session_user_id)) {
              return (string) $session_user_id;
          }
  
          $cookie_name = $this->getCookieUserName();
          $cookie_user_id = $this->request->cookie($cookie_name, '', 'string');
  
          if (!empty($cookie_user_id)) {
              return $cookie_user_id;
          }
  
          $generated_user_id = '_' . gplcart_string_random(6);
          $this->request->setCookie($cookie_name, $generated_user_id, $this->getCookieLifespan());
          return $generated_user_id;
      }
code_tokens: public function getUid ( ) { $ session_user_id = $ this -> user -> getId ( ) ; if ( ! empty ( $ session_user_id ) ) { return ( string ) $ session_user_id ; } $ cookie_name = $ this -> getCookieUserName ( ) ; $ cookie_user_id = $ this -> request -> cookie ( $ cookie_name , '' , 'string' ) ; if ( ! empty ( $ cookie_user_id ) ) { return $ cookie_user_id ; } $ generated_user_id = '_' . gplcart_string_random ( 6 ) ; $ this -> request -> setCookie ( $ cookie_name , $ generated_user_id , $ this -> getCookieLifespan ( ) ) ; return $ generated_user_id ; }
docstring: Returns the cart user ID
  @return string
docstring_tokens: Returns the cart user ID