public function __construct(ValueResolverInterface $resolver = null, int $limit = 5) { $this->resolver = $resolver; if ($limit < 1) { throw InvalidArgumentExceptionFactory::createForInvalidLimitValue($limit); } $this->limit = $limit; }