src/SharedData.php
protected function mergeDataEntry($value, $key) {
        if (!isset($this->shared[$key])) {
            $this->shared[$key] = $value;
        } elseif (isset($this->shared[$key]['#merged'])) {
            $this->shared[$key]['#value'][] = $value;
        } else {
            $oldValue = $this->shared[$key];
            $this->shared[$key] = [
                '#merged' => true,
                '#value' => [$oldValue, $value]
            ];
        }
    }
protected function mergeDataEntry($value, $key) {
        if (!isset($this->shared[$key])) {
            $this->shared[$key] = $value;
        } elseif (isset($this->shared[$key]['#merged'])) {
            $this->shared[$key]['#value'][] = $value;
        } else {
            $oldValue = $this->shared[$key];
            $this->shared[$key] = [
                '#merged' => true,
                '#value' => [$oldValue, $value]
            ];
        }
    }
protected function mergeDataEntry ( $ value , $ key ) { if ( ! isset ( $ this -> shared [ $ key ] ) ) { $ this -> shared [ $ key ] = $ value ; } elseif ( isset ( $ this -> shared [ $ key ] [ '#merged' ] ) ) { $ this -> shared [ $ key ] [ '#value' ] [ ] = $ value ; } else { $ oldValue = $ this -> shared [ $ key ] ; $ this -> shared [ $ key ] = [ '#merged' => true , '#value' => [ $ oldValue , $ value ] ] ; } }
Merge data entry with new one
@param mixed  $value
@param string $key
@internal
Merge data entry with new one