invalidCurrency() 공개 정적인 메소드

public static invalidCurrency ( string $currency ) : InvalidArgumentException
$currency string
리턴 InvalidArgumentException
예제 #1
0
파일: Cart.php 프로젝트: dumplie/dumplie
 /**
  * @param CartId $cartId
  * @param string $currency
  *
  * @throws InvalidArgumentException
  */
 public function __construct(CartId $cartId, string $currency)
 {
     if (!Currencies::isValid($currency)) {
         throw InvalidArgumentException::invalidCurrency($currency);
     }
     $this->id = $cartId;
     $this->items = [];
     $this->currency = $currency;
 }