<?php

namespace App\Classes\Modules\Segments\Services;

class UpdatesConstantValue
{

    /**
     * @param $json
     * @param int $state_id
     * @param array $rate
     * @return array
     */
    public function execute($json, int $state_id, Array $rate) {

        $objectArray = (array) $json;

        $objectArray[$state_id] = $rate;

        return $objectArray;
    }

}