Lint
This commit is contained in:
parent
b896c37c31
commit
1dc797948e
|
@ -4,7 +4,6 @@ namespace App\Group\Actions;
|
|||
|
||||
use App\Group;
|
||||
use App\Group\Enums\Level;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Lorisleiva\Actions\ActionRequest;
|
||||
|
@ -14,6 +13,9 @@ class GroupBulkstoreAction
|
|||
{
|
||||
use AsAction;
|
||||
|
||||
/**
|
||||
* @return array<string, string|array<int, string|Rule>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
|
@ -23,7 +25,10 @@ class GroupBulkstoreAction
|
|||
];
|
||||
}
|
||||
|
||||
public function handle($groups): void
|
||||
/**
|
||||
* @param array<int, array{id: int, inner_name: string, level: string}> $groups
|
||||
*/
|
||||
public function handle(array $groups): void
|
||||
{
|
||||
foreach ($groups as $payload) {
|
||||
Group::find($payload['id'])->update(['level' => $payload['level'], 'inner_name' => $payload['inner_name']]);
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
|
||||
namespace App\Group\Resources;
|
||||
|
||||
use App\Group;
|
||||
use App\Lib\HasMeta;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/**
|
||||
* @mixin Group
|
||||
*/
|
||||
class GroupResource extends JsonResource
|
||||
{
|
||||
|
||||
|
@ -14,7 +18,7 @@ class GroupResource extends JsonResource
|
|||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
|
@ -27,6 +31,9 @@ class GroupResource extends JsonResource
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function meta(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Illuminate\Testing;
|
|||
use Symfony\Component\HttpFoundation\File\File;
|
||||
|
||||
/**
|
||||
* @method self assertInertiaPath(string $path, string|array<string, mixed>|int $value)
|
||||
* @method self assertInertiaPath(string $path, string|array<string, mixed>|int|null $value)
|
||||
* @method self assertPdfPageCount(int $count)
|
||||
* @method self assertPdfName(string $filename)
|
||||
* @method File getFile()
|
||||
|
|
Loading…
Reference in New Issue