Skip to content

Commit

Permalink
Parameter #2 $keys of static method Illuminate\Support\Arr::has() exp…
Browse files Browse the repository at this point in the history
…ects array|string, int|string given.

Parameter #2 $key of static method Illuminate\Support\Arr::set() expects string|null, int|string given.
  • Loading branch information
LastDragon-ru committed Aug 14, 2021
1 parent 4bfcb7b commit e96da44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/spa/src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ public function validated(): array {
// Replace values
foreach ($validator->getRules() as $attribute => $rules) {
/** @var ValueProvider|null $provider */
$provider = Arr::last($rules, static function ($rule) {
$provider = Arr::last($rules, static function ($rule) {
return $rule instanceof ValueProvider;
});
$attribute = (string) $attribute;

if ($provider && Arr::has($validated, $attribute)) {
$value = Arr::get($validated, $attribute);
Expand Down

0 comments on commit e96da44

Please sign in to comment.