original_string: public function delete($product_id)
      {
          $result = null;
          $this->hook->attach('product.compare.delete.product.before', $product_id, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          if (!$this->compare->delete($product_id)) {
              return $this->getResultError();
          }
  
          $result = $this->getResultDeleted();
          $this->hook->attach('product.compare.delete.product.after', $product_id, $result, $this);
          return (array) $result;
      }
code: public function delete($product_id)
      {
          $result = null;
          $this->hook->attach('product.compare.delete.product.before', $product_id, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          if (!$this->compare->delete($product_id)) {
              return $this->getResultError();
          }
  
          $result = $this->getResultDeleted();
          $this->hook->attach('product.compare.delete.product.after', $product_id, $result, $this);
          return (array) $result;
      }
code_tokens: public function delete ( $ product_id ) { $ result = null ; $ this -> hook -> attach ( 'product.compare.delete.product.before' , $ product_id , $ result , $ this ) ; if ( ! empty ( $ result ) ) { return ( array ) $ result ; } if ( ! $ this -> compare -> delete ( $ product_id ) ) { return $ this -> getResultError ( ) ; } $ result = $ this -> getResultDeleted ( ) ; $ this -> hook -> attach ( 'product.compare.delete.product.after' , $ product_id , $ result , $ this ) ; return ( array ) $ result ; }
docstring: Removes a product from comparison and returns an array of result data
  @param integer $product_id
  @return array
docstring_tokens: Removes a product from comparison and returns an array of result data