private function doAddArray(array &$array, array &$jsonMessage)
    {
        if (isset($array[$jsonMessage['key']])) {
            if (
                isset($array[$jsonMessage['key']]['segmentCode'])
                ||
                $jsonMessage['key'] === 'UnrecognisedType'
            ) {
                $temp = $array[$jsonMessage['key']];
                $array[$jsonMessage['key']] = [];
                $array[$jsonMessage['key']][] = $temp;
            }
            $array[$jsonMessage['key']][] = $jsonMessage['value'];
        } else {
            $array[$jsonMessage['key']] = $jsonMessage['value'];
        }
    }
private function doAddArray(array &$array, array &$jsonMessage)
    {
        if (isset($array[$jsonMessage['key']])) {
            if (
                isset($array[$jsonMessage['key']]['segmentCode'])
                ||
                $jsonMessage['key'] === 'UnrecognisedType'
            ) {
                $temp = $array[$jsonMessage['key']];
                $array[$jsonMessage['key']] = [];
                $array[$jsonMessage['key']][] = $temp;
            }
            $array[$jsonMessage['key']][] = $jsonMessage['value'];
        } else {
            $array[$jsonMessage['key']] = $jsonMessage['value'];
        }
    }
private function doAddArray ( array & $ array , array & $ jsonMessage ) { if ( isset ( $ array [ $ jsonMessage [ 'key' ] ] ) ) { if ( isset ( $ array [ $ jsonMessage [ 'key' ] ] [ 'segmentCode' ] ) || $ jsonMessage [ 'key' ] === 'UnrecognisedType' ) { $ temp = $ array [ $ jsonMessage [ 'key' ] ] ; $ array [ $ jsonMessage [ 'key' ] ] = [ ] ; $ array [ $ jsonMessage [ 'key' ] ] [ ] = $ temp ; } $ array [ $ jsonMessage [ 'key' ] ] [ ] = $ jsonMessage [ 'value' ] ; } else { $ array [ $ jsonMessage [ 'key' ] ] = $ jsonMessage [ 'value' ] ; } }
Adds a processed segment to the current group.

@param array $array       a reference to the group
@param array $jsonMessage a segment processed by processSegment()

@return void
Adds a processed segment to the current group .