public static function createForInvalidLimitValue(int $limit) : \InvalidArgumentException { return new \InvalidArgumentException(sprintf('Expected limit value to be a strictly positive integer, got "%d" instead.', $limit)); }
public function __construct(ValueResolverInterface $resolver = null, int $limit = 5) { $this->resolver = $resolver; if ($limit < 1) { throw InvalidArgumentExceptionFactory::createForInvalidLimitValue($limit); } $this->limit = $limit; }