diff --git a/src/Illuminate/Contracts/Validation/InvokableRule.php b/src/Illuminate/Contracts/Validation/InvokableRule.php index bed9ed567fb4..17c296446945 100644 --- a/src/Illuminate/Contracts/Validation/InvokableRule.php +++ b/src/Illuminate/Contracts/Validation/InvokableRule.php @@ -14,7 +14,7 @@ interface InvokableRule * * @param string $attribute * @param mixed $value - * @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail + * @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail * @return void */ public function __invoke(string $attribute, mixed $value, Closure $fail); diff --git a/src/Illuminate/Contracts/Validation/ValidationRule.php b/src/Illuminate/Contracts/Validation/ValidationRule.php index c687b26a2d98..6829372b3714 100644 --- a/src/Illuminate/Contracts/Validation/ValidationRule.php +++ b/src/Illuminate/Contracts/Validation/ValidationRule.php @@ -11,7 +11,7 @@ interface ValidationRule * * @param string $attribute * @param mixed $value - * @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail + * @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail * @return void */ public function validate(string $attribute, mixed $value, Closure $fail): void; diff --git a/src/Illuminate/Foundation/Console/stubs/rule.implicit.stub b/src/Illuminate/Foundation/Console/stubs/rule.implicit.stub index e04915bf5852..fa23cdfc2139 100644 --- a/src/Illuminate/Foundation/Console/stubs/rule.implicit.stub +++ b/src/Illuminate/Foundation/Console/stubs/rule.implicit.stub @@ -17,7 +17,7 @@ class {{ class }} implements ValidationRule /** * Run the validation rule. * - * @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail + * @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail */ public function validate(string $attribute, mixed $value, Closure $fail): void { diff --git a/src/Illuminate/Foundation/Console/stubs/rule.stub b/src/Illuminate/Foundation/Console/stubs/rule.stub index 7b54420895b4..bc1d35139247 100644 --- a/src/Illuminate/Foundation/Console/stubs/rule.stub +++ b/src/Illuminate/Foundation/Console/stubs/rule.stub @@ -10,7 +10,7 @@ class {{ class }} implements ValidationRule /** * Run the validation rule. * - * @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail + * @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail */ public function validate(string $attribute, mixed $value, Closure $fail): void { diff --git a/types/Contracts/Validation/ValidationRule.php b/types/Contracts/Validation/ValidationRule.php new file mode 100644 index 000000000000..565a7d972340 --- /dev/null +++ b/types/Contracts/Validation/ValidationRule.php @@ -0,0 +1,13 @@ +