. */ declare(strict_types=1); namespace FireflyIII\Transformers; use FireflyIII\Models\Preference; /** * Class PreferenceTransformer */ class PreferenceTransformer extends AbstractTransformer { /** * Transform the preference * * @param Preference $preference * * @return array */ public function transform(Preference $preference): array { return [ 'id' => $preference->id, 'created_at' => $preference->created_at->toAtomString(), 'updated_at' => $preference->updated_at->toAtomString(), 'name' => $preference->name, 'data' => $preference->data, ]; } }