+ validate_cases(cases, min_length = 2, min_count = 1)
+ if (!identical(serial, TRUE) && !identical(serial, FALSE)) {
+ stop(
+ paste("The serial distribution flag (`serial`) must be set to",
+ "`TRUE` or `FALSE`."
+ ), call. = FALSE
+ )
+ }
+
+ if (identical(mu, NA)) {
+ if (!is_integer(grid_length) || grid_length < 1) {
+ stop("The grid length must be a positive integer.", call. = FALSE)
+ }
+ if (!is_real(max_shape) || max_shape <= 0) {
+ stop(
+ paste("The largest value of the shape parameter (`max_shape`)",
+ "must be a positive number."
+ ), call. = FALSE
+ )
+ }
+ if (!is_real(max_scale) || max_scale <= 0) {
+ stop(
+ paste("The largest value of the scale parameter (`max_scale`)",
+ "must be a positive number."
+ ), call. = FALSE
+ )
+ }
+