From db34a865455a1c366ee6d5b36fae23e918837fe6 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Fri, 4 Jul 2025 14:47:14 -0500 Subject: [PATCH] Ignore classes for code coverage --- app/Rules/ValidRegistrationCode.php | 4 +++- app/Rules/ValidateAuditionKey.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/Rules/ValidRegistrationCode.php b/app/Rules/ValidRegistrationCode.php index e9e6121..647a3b4 100644 --- a/app/Rules/ValidRegistrationCode.php +++ b/app/Rules/ValidRegistrationCode.php @@ -4,9 +4,11 @@ namespace App\Rules; use App\Settings; use Closure; -use Hamcrest\Core\Set; use Illuminate\Contracts\Validation\ValidationRule; +/** + * @codeCoverageIgnore + */ class ValidRegistrationCode implements ValidationRule { /** diff --git a/app/Rules/ValidateAuditionKey.php b/app/Rules/ValidateAuditionKey.php index fcdea0f..c32b872 100644 --- a/app/Rules/ValidateAuditionKey.php +++ b/app/Rules/ValidateAuditionKey.php @@ -6,8 +6,20 @@ use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Facades\DB; +/** + * @codeCoverageIgnore + */ class ValidateAuditionKey implements ValidationRule { + /** + * Validates the given attribute and value to ensure they correspond + * to an existing audition in the database. If the audition ID does + * not exist, the validation will fail with the provided message. + * + * @param string $attribute The attribute being validated. + * @param mixed $value The value of the attribute. + * @param Closure $fail Callback function to indicate validation failure. + */ public function validate(string $attribute, mixed $value, Closure $fail): void { // Extract the key from the attribute