Fixed code style.

This commit is contained in:
Jan Böhmer 2020-08-21 21:36:22 +02:00
parent 2853e471c4
commit d0b1024d80
212 changed files with 495 additions and 1005 deletions

View file

@ -1,9 +1,7 @@
<?php
namespace App\Services;
use App\Entity\PriceInformations\Currency;
use Brick\Math\BigDecimal;
use Swap\Swap;
@ -21,14 +19,12 @@ class ExchangeRateUpdater
/**
* Updates the exchange rate of the given currency using the globally configured providers.
* @param Currency $currency
* @return Currency
*/
public function update(Currency $currency): Currency
{
$rate = $this->swap->latest($currency->getIsoCode().'/'.$this->base_currency);
$currency->setExchangeRate(BigDecimal::of($rate->getValue()));
return $currency;
}
}
}