Skip to content

Commit

Permalink
Fix $fail closure type in docblocks for validation rules (#52644)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastien-phi authored Sep 4, 2024
1 parent 7a3166c commit 769f00b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Contracts/Validation/InvokableRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface InvokableRule
*
* @param string $attribute
* @param mixed $value
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @return void
*/
public function __invoke(string $attribute, mixed $value, Closure $fail);
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Contracts/Validation/ValidationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface ValidationRule
*
* @param string $attribute
* @param mixed $value
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @return void
*/
public function validate(string $attribute, mixed $value, Closure $fail): void;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/stubs/rule.implicit.stub
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class {{ class }} implements ValidationRule
/**
* Run the validation rule.
*
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/stubs/rule.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{ class }} implements ValidationRule
/**
* Run the validation rule.
*
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string = null): \Illuminate\Translation\PotentiallyTranslatedString $fail
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
Expand Down

0 comments on commit 769f00b

Please sign in to comment.