| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | private function generateFakeProvider(float $ratio): ExchangeRateProviderInterface |
||
| 18 | { |
||
| 19 | return new class($ratio) implements ExchangeRateProviderInterface |
||
| 20 | { |
||
| 21 | private $ratio; |
||
| 22 | |||
| 23 | public function __construct(float $ratio) |
||
| 24 | { |
||
| 25 | $this->ratio = $ratio; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getExchangeRate(CurrencyInterface $sourceCurrency, CurrencyInterface $targetCurrency, DateTimeInterface $date = null): ExchangeRateInterface |
||
| 29 | { |
||
| 30 | return new ExchangeRate($sourceCurrency, $targetCurrency, $this->ratio); |
||
| 31 | } |
||
| 32 | |||
| 33 | }; |
||
| 34 | } |
||
| 35 | |||
| 45 | } |