Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function __construct( |
||
29 | CurrencyInterface $sourceCurrency, |
||
30 | CurrencyInterface $targetCurrency, |
||
31 | float $ratio |
||
32 | ) { |
||
33 | $this->sourceCurrency = $sourceCurrency; |
||
34 | $this->targetCurrency = $targetCurrency; |
||
35 | if ($ratio <= 0) { |
||
36 | throw new \InvalidArgumentException("Ratio must be a positive float."); |
||
37 | } |
||
38 | $this->ratio = $ratio; |
||
39 | } |
||
40 | |||
77 |