original_string: public function setItemPriceFormatted(array &$item, $price_model, $currency = null)
      {
          if (!isset($currency)) {
              $currency = $item['currency'];
          }
  
          $price = $price_model->convert($item['price'], $item['currency'], $currency);
          $item['price_formatted'] = $price_model->format($price, $currency);
  
          if (isset($item['original_price'])) {
              $price = $price_model->convert($item['original_price'], $item['currency'], $currency);
              $item['original_price_formatted'] = $price_model->format($price, $currency);
          }
      }
code: public function setItemPriceFormatted(array &$item, $price_model, $currency = null)
      {
          if (!isset($currency)) {
              $currency = $item['currency'];
          }
  
          $price = $price_model->convert($item['price'], $item['currency'], $currency);
          $item['price_formatted'] = $price_model->format($price, $currency);
  
          if (isset($item['original_price'])) {
              $price = $price_model->convert($item['original_price'], $item['currency'], $currency);
              $item['original_price_formatted'] = $price_model->format($price, $currency);
          }
      }
code_tokens: public function setItemPriceFormatted ( array & $ item , $ price_model , $ currency = null ) { if ( ! isset ( $ currency ) ) { $ currency = $ item [ 'currency' ] ; } $ price = $ price_model -> convert ( $ item [ 'price' ] , $ item [ 'currency' ] , $ currency ) ; $ item [ 'price_formatted' ] = $ price_model -> format ( $ price , $ currency ) ; if ( isset ( $ item [ 'original_price' ] ) ) { $ price = $ price_model -> convert ( $ item [ 'original_price' ] , $ item [ 'currency' ] , $ currency ) ; $ item [ 'original_price_formatted' ] = $ price_model -> format ( $ price , $ currency ) ; } }
docstring: Add keys with formatted prices
  @param array $item
  @param \gplcart\core\models\Price $price_model
  @param string|null $currency
docstring_tokens: Add keys with formatted prices