original_string: protected function updateCurrencyRates(Currency $currency)
      {
          $baseExchangeRate = $this->table[$currency->getCode()];
  
          foreach ($this->table as $currencySymbol => $exchangeRate) {
              $rate = $this->calculateExchangeRate($baseExchangeRate, $currencySymbol);
              $this->addUpdateExchangeRate($currency->getCode(), $currencySymbol, $rate);
          }
  
          $this->helper->getEntityManager()->flush();
      }
code: protected function updateCurrencyRates(Currency $currency)
      {
          $baseExchangeRate = $this->table[$currency->getCode()];
  
          foreach ($this->table as $currencySymbol => $exchangeRate) {
              $rate = $this->calculateExchangeRate($baseExchangeRate, $currencySymbol);
              $this->addUpdateExchangeRate($currency->getCode(), $currencySymbol, $rate);
          }
  
          $this->helper->getEntityManager()->flush();
      }
code_tokens: protected function updateCurrencyRates ( Currency $ currency ) { $ baseExchangeRate = $ this -> table [ $ currency -> getCode ( ) ] ; foreach ( $ this -> table as $ currencySymbol => $ exchangeRate ) { $ rate = $ this -> calculateExchangeRate ( $ baseExchangeRate , $ currencySymbol ) ; $ this -> addUpdateExchangeRate ( $ currency -> getCode ( ) , $ currencySymbol , $ rate ) ; } $ this -> helper -> getEntityManager ( ) -> flush ( ) ; }
docstring: Updates managed currency with exchange rates
  
  @param Currency $currency
docstring_tokens: Updates managed currency with exchange rates