<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\entities\operators;

use apexl\Io\modules\user\entities\RefreshToken;
use apexl\Io\operators\entityDatabaseOperator;

final class RefreshTokenOperator extends entityDatabaseOperator
{
    public function store(array $data): bool|array
    {
        $data['token'] = RefreshToken::hashToken($data['token']);

        return parent::store($data);
    }
}