Пример #1
0
 /**
  * @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);
 }
Пример #2
0
 /**
  * @param array<\sndsgd\ErrorInterface>
  */
 public function setErrors(array $errors)
 {
     $this->errors = \sndsgd\TypeTest::typedArray($errors, \sndsgd\ErrorInterface::class);
 }