original_string: protected function sumTotalWeight(&$total, array &$item, array $order)
      {
          $product = &$item['product'];
  
          if ($product['weight_unit'] !== $order['weight_unit']) {
  
              try {
                  $product['weight'] = $this->convertor->convert($product['weight'], $product['weight_unit'], $order['weight_unit']);
              } catch (Exception $ex) {
                  return null;
              }
  
              $product['weight_unit'] = $order['weight_unit'];
          }
  
          $total += (float) ($product['weight'] * $item['quantity']);
          return null;
      }
code: protected function sumTotalWeight(&$total, array &$item, array $order)
      {
          $product = &$item['product'];
  
          if ($product['weight_unit'] !== $order['weight_unit']) {
  
              try {
                  $product['weight'] = $this->convertor->convert($product['weight'], $product['weight_unit'], $order['weight_unit']);
              } catch (Exception $ex) {
                  return null;
              }
  
              $product['weight_unit'] = $order['weight_unit'];
          }
  
          $total += (float) ($product['weight'] * $item['quantity']);
          return null;
      }
code_tokens: protected function sumTotalWeight ( & $ total , array & $ item , array $ order ) { $ product = & $ item [ 'product' ] ; if ( $ product [ 'weight_unit' ] !== $ order [ 'weight_unit' ] ) { try { $ product [ 'weight' ] = $ this -> convertor -> convert ( $ product [ 'weight' ] , $ product [ 'weight_unit' ] , $ order [ 'weight_unit' ] ) ; } catch ( Exception $ ex ) { return null ; } $ product [ 'weight_unit' ] = $ order [ 'weight_unit' ] ; } $ total += ( float ) ( $ product [ 'weight' ] * $ item [ 'quantity' ] ) ; return null ; }
docstring: Sum weight totals
  @param float $total
  @param array $item
  @param array $order
  @return null
docstring_tokens: Sum weight totals