<?php

namespace App\Classes\Modules\Accounts\Services;


use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\UserEmailVerification;
use Illuminate\Database\Eloquent\Model;

class CompletesEmailVerificationAttempt extends AbstractUpdateRecord
{

    /**
     * @param UserEmailVerification $model
     * @return Model
     * @throws MalformedRequestException
     */
    public function execute(UserEmailVerification $model): Model {
        $model->is_complete = true;
        return $this->handler($model);
    }

}
