Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Exchange_Rate_Service_Result | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Object for recording/caching the API response for an exchange rate. |
| 4 | * |
| 5 | * @package brianhenryie/bh-wp-bitcoin-gateway |
| 6 | */ |
| 7 | |
| 8 | namespace BrianHenryIE\WP_Bitcoin_Gateway\API\Services\Results; |
| 9 | |
| 10 | use BrianHenryIE\WP_Bitcoin_Gateway\API\Services\Exchange_Rate_Service; |
| 11 | use BrianHenryIE\WP_Bitcoin_Gateway\Brick\Money\Money; |
| 12 | use DateTimeInterface; |
| 13 | |
| 14 | /** |
| 15 | * @used-by Exchange_Rate_Service |
| 16 | */ |
| 17 | readonly class Exchange_Rate_Service_Result { |
| 18 | |
| 19 | /** |
| 20 | * Constructor |
| 21 | * |
| 22 | * @param Money $rate The value of a currency that equates to 1 BTC. |
| 23 | * @param string $api_classname The API the exchange rate was fetched from. |
| 24 | * @param DateTimeInterface $date_saved When it was queried/saved. |
| 25 | * @param ?Exchange_Rate_Service_Result $previous_cached_exchange_rate The last saved rate/api_classname/date_saved, if any. |
| 26 | */ |
| 27 | public function __construct( |
| 28 | public Money $rate, |
| 29 | public string $api_classname, |
| 30 | public DateTimeInterface $date_saved, |
| 31 | public ?Exchange_Rate_Service_Result $previous_cached_exchange_rate = null, |
| 32 | ) { |
| 33 | } |
| 34 | } |