original_string: public function setItemOrderAddress(&$order, $address_model)
      {
          $order['address'] = array();
  
          foreach (array('shipping', 'payment') as $type) {
              $address = $address_model->get($order["{$type}_address"]);
              if (!empty($address)) {
                  $order['address'][$type] = $address;
                  $order['address_translated'][$type] = $address_model->getTranslated($order['address'][$type], true);
              }
          }
      }
code: public function setItemOrderAddress(&$order, $address_model)
      {
          $order['address'] = array();
  
          foreach (array('shipping', 'payment') as $type) {
              $address = $address_model->get($order["{$type}_address"]);
              if (!empty($address)) {
                  $order['address'][$type] = $address;
                  $order['address_translated'][$type] = $address_model->getTranslated($order['address'][$type], true);
              }
          }
      }
code_tokens: public function setItemOrderAddress ( & $ order , $ address_model ) { $ order [ 'address' ] = array ( ) ; foreach ( array ( 'shipping' , 'payment' ) as $ type ) { $ address = $ address_model -> get ( $ order [ "{$type}_address" ] ) ; if ( ! empty ( $ address ) ) { $ order [ 'address' ] [ $ type ] = $ address ; $ order [ 'address_translated' ] [ $ type ] = $ address_model -> getTranslated ( $ order [ 'address' ] [ $ type ] , true ) ; } } }
docstring: Adds an address information for the order item
  @param array $order
  @param \gplcart\core\models\Address $address_model
docstring_tokens: Adds an address information for the order item