1<?php
2
3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4// See the LICENCE file in the repository root for full licence text.
5
6declare(strict_types=1);
7
8namespace App\Transformers;
9
10use App\Models\Country;
11use App\Models\Multiplayer\Room;
12use App\Models\Season;
13use App\Models\Spotlight;
14
15class SelectOptionTransformer extends TransformerAbstract
16{
17 public function transform(Country|Room|Season|Spotlight $item): array
18 {
19 return [
20 'id' => $item->getKey(),
21 'text' => $item->name,
22 ];
23 }
24}