/** * @param array<\sndsgd\rate\Limit> $limits */ public function __construct(array $limits) { if (empty($limits)) { throw new \InvalidArgumentException("invalid value provided for 'limits'; expecting an array " . "with at least one instance of sndsgd\\rate\\LimitInterface"); } $type = \sndsgd\rate\LimitInterface::class; $this->limits = \sndsgd\TypeTest::typedArray($limits, $type); }
/** * Set the host portion of the url * * @param string $host */ public function setHost($host = null) { $this->host = TypeTest::nullableString($host, "host"); }
/** * @param array<\sndsgd\ErrorInterface> */ public function setErrors(array $errors) { $this->errors = \sndsgd\TypeTest::typedArray($errors, \sndsgd\ErrorInterface::class); }