public static function createForInvalidLimitValueForRecursiveCalls(int $limit) : \InvalidArgumentException { return new \InvalidArgumentException(sprintf('Expected limit for recursive calls to be of at least 2. Got "%d" instead.', $limit)); }
public function __construct(ChainableParameterResolverInterface $resolver, int $limit = 5) { $this->resolver = $resolver; if (2 >= $limit) { throw InvalidArgumentExceptionFactory::createForInvalidLimitValueForRecursiveCalls($limit); } $this->limit = $limit; }