original_string: protected function updateCart(array $order, array $cart)
      {
          foreach ($cart['items'] as $item) {
  
              $data = array(
                  'user_id' => $order['user_id'],
                  'order_id' => $order['order_id']
              );
  
              $this->cart->update($item['cart_id'], $data);
          }
      }
code: protected function updateCart(array $order, array $cart)
      {
          foreach ($cart['items'] as $item) {
  
              $data = array(
                  'user_id' => $order['user_id'],
                  'order_id' => $order['order_id']
              );
  
              $this->cart->update($item['cart_id'], $data);
          }
      }
code_tokens: protected function updateCart ( array $ order , array $ cart ) { foreach ( $ cart [ 'items' ] as $ item ) { $ data = array ( 'user_id' => $ order [ 'user_id' ] , 'order_id' => $ order [ 'order_id' ] ) ; $ this -> cart -> update ( $ item [ 'cart_id' ] , $ data ) ; } }
docstring: Update cart items after order was created
  @param array $order
  @param array $cart
docstring_tokens: Update cart items after order was created