Service/Calc/Bonus/Z/Proc/Compress/Phase1.php
private function populateCompressedSnapWithPv($tree, $compressionData, $keyPv)
    {
        $result = $tree;
        foreach ($compressionData as $custId => $data) {
            /* 0 - PV, 1 - parentId */
            $pv = $data[0];
            $entry = $result[$custId];
            if (is_array($entry)) {
                $entry[$keyPv] = $pv;
            } else {
                $entry->set($keyPv, $pv);
            }
            $result[$custId] = $entry;
        }
        return $result;
    }
private function populateCompressedSnapWithPv($tree, $compressionData, $keyPv)
    {
        $result = $tree;
        foreach ($compressionData as $custId => $data) {
            /* 0 - PV, 1 - parentId */
            $pv = $data[0];
            $entry = $result[$custId];
            if (is_array($entry)) {
                $entry[$keyPv] = $pv;
            } else {
                $entry->set($keyPv, $pv);
            }
            $result[$custId] = $entry;
        }
        return $result;
    }
Populate phase 1 compressed $tree with compressed PV data.

@param array $tree compressed tree w/o PV data
@param array $compressionData compression data with compressed PV
@return array compressed tree with PV data