original_string: public function getError($key = null)
      {
          if (isset($key)) {
              return gplcart_array_get($this->errors, $key);
          }
  
          return $this->errors;
      }
code: public function getError($key = null)
      {
          if (isset($key)) {
              return gplcart_array_get($this->errors, $key);
          }
  
          return $this->errors;
      }
code_tokens: public function getError ( $ key = null ) { if ( isset ( $ key ) ) { return gplcart_array_get ( $ this -> errors , $ key ) ; } return $ this -> errors ; }
docstring: Returns a single error or an array of all defined errors
  @param null|string $key
  @return mixed
docstring_tokens: Returns a single error or an array of all defined errors