Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

CurrencyPair.php 540 B

pirms 5 gadiem
pirms 5 gadiem
1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Utils\Money;
  4. class CurrencyPair
  5. {
  6. private Currency $base;
  7. private Currency $quote;
  8. public function __construct(Currency $base, Currency $quote)
  9. {
  10. $this->base = $base;
  11. $this->quote = $quote;
  12. }
  13. public function getBase(): Currency
  14. {
  15. return $this->base;
  16. }
  17. public function getQuote(): Currency
  18. {
  19. return $this->quote;
  20. }
  21. public function __toString()
  22. {
  23. return $this->base . '/' . $this->quote;
  24. }
  25. }