Exemplo n.º 1
0
 /**
  * @param array $countryCodes
  *
  * @throws \InvalidArgumentException
  *
  * @return static
  */
 public function withCountryCodes(array $countryCodes)
 {
     Assertion::allString($countryCodes);
     Assertion::allNotBlank($countryCodes);
     $instance = clone $this;
     $instance->countryCodes = $countryCodes;
     return $instance;
 }
Exemplo n.º 2
0
 /**
  * @param array $stockTickers
  *
  * @throws \InvalidArgumentException
  *
  * @return static
  */
 public function withStockTickers(array $stockTickers)
 {
     Assertion::allString($stockTickers);
     Assertion::allNotBlank($stockTickers);
     Assertion::lessOrEqualThan(count($stockTickers), NewsInterface::STOCK_TICKERS_MAX_COUNT);
     $instance = clone $this;
     $instance->stockTickers = $stockTickers;
     return $instance;
 }