Use map() instead of transform(), use fn() instead of function(), consistent coding for form.select
Some checks failed
Create Docker Image / Build Docker Image (x86_64) (push) Failing after 28s
Create Docker Image / Final Docker Image Manifest (push) Has been skipped

This commit is contained in:
2024-08-18 14:02:03 +10:00
parent 5139b26a05
commit 2c3665650c
15 changed files with 23 additions and 22 deletions

View File

@@ -367,7 +367,7 @@ class Product extends Model implements IDs
return round($price,2);
}
public function accounting(string $provider): Collection
public function accounting(): Collection
{
$so = ProviderOauth::where('name',self::provider)
->sole();
@@ -379,7 +379,7 @@ class Product extends Model implements IDs
->API()
->getItems()
->pluck('pid','Id')
->transform(fn($item,$value)=>['id'=>$value,'value'=>$item])
->map(fn($item,$value)=>['id'=>$value,'value'=>$item])
->values();
}