fix scramble diagnostics in goal resource and requests

This commit is contained in:
Gregor Vostrak
2026-10-08 18:11:30 +02:00
parent de05e9da46
commit b8b0c615de
4 changed files with 31 additions and 28 deletions

View File

@@ -17,6 +17,7 @@ use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\In;
use Illuminate\Validation\Rules\ProhibitedIf;
use Korridor\LaravelModelValidationRules\Rules\ExistsEloquent;
/**
@@ -29,7 +30,7 @@ class GoalStoreRequest extends BaseFormRequest
/**
* Get the validation rules that apply to the request.
*
* @return array<string, array<string|ValidationRule|LegacyValidationRule|In|\Closure>>
* @return array<string, array<string|ValidationRule|LegacyValidationRule|In|ProhibitedIf|\Closure>>
*/
public function rules(): array
{
@@ -97,7 +98,7 @@ class GoalStoreRequest extends BaseFormRequest
],
], $this->filterRules(
// Without a member_id the goal is for the current member
$this->has('member_id') && $this->input('member_id') === null,
fn (): bool => $this->has('member_id') && $this->input('member_id') === null,
));
}