original_string: public function productId(array $condition, array $data)
      {
          if (empty($data['cart']['items']) || !in_array($condition['operator'], array('=', '!='))) {
              return false;
          }
  
          $ids = array();
  
          foreach ($data['cart']['items'] as $item) {
              $ids[] = $item['product_id'];
          }
  
          return $this->compare($ids, $condition['value'], $condition['operator']);
      }
code: public function productId(array $condition, array $data)
      {
          if (empty($data['cart']['items']) || !in_array($condition['operator'], array('=', '!='))) {
              return false;
          }
  
          $ids = array();
  
          foreach ($data['cart']['items'] as $item) {
              $ids[] = $item['product_id'];
          }
  
          return $this->compare($ids, $condition['value'], $condition['operator']);
      }
code_tokens: public function productId ( array $ condition , array $ data ) { if ( empty ( $ data [ 'cart' ] [ 'items' ] ) || ! in_array ( $ condition [ 'operator' ] , array ( '=' , '!=' ) ) ) { return false ; } $ ids = array ( ) ; foreach ( $ data [ 'cart' ] [ 'items' ] as $ item ) { $ ids [ ] = $ item [ 'product_id' ] ; } return $ this -> compare ( $ ids , $ condition [ 'value' ] , $ condition [ 'operator' ] ) ; }
docstring: Whether the cart product ID condition is met
  @param array $condition
  @param array $data
  @return boolean
docstring_tokens: Whether the cart product ID condition is met