public static function textExceedsMaximumLength($max_len) { return new static('String Parameter exceeds length of ' . $max_len); }
public static function checkStringLength($string, $max_len) { if (strlen($string) > $max_len) { throw CouldNotCreateMessage::textExceedsMaximumLength($max_len); } return $string; }