original_string: protected function prepareComponents(array &$order)
      {
          if (!empty($order['cart']['items'])) {
              foreach ($order['cart']['items'] as $sku => $item) {
                  $price = isset($item['total']) ? $item['total'] : null;
                  $order['data']['components']['cart']['items'][$sku]['price'] = $price;
              }
          }
      }
code: protected function prepareComponents(array &$order)
      {
          if (!empty($order['cart']['items'])) {
              foreach ($order['cart']['items'] as $sku => $item) {
                  $price = isset($item['total']) ? $item['total'] : null;
                  $order['data']['components']['cart']['items'][$sku]['price'] = $price;
              }
          }
      }
code_tokens: protected function prepareComponents ( array & $ order ) { if ( ! empty ( $ order [ 'cart' ] [ 'items' ] ) ) { foreach ( $ order [ 'cart' ] [ 'items' ] as $ sku => $ item ) { $ price = isset ( $ item [ 'total' ] ) ? $ item [ 'total' ] : null ; $ order [ 'data' ] [ 'components' ] [ 'cart' ] [ 'items' ] [ $ sku ] [ 'price' ] = $ price ; } } }
docstring: Prepares order components
  @param array $order
docstring_tokens: Prepares order components