private function mergeChildData($nodeData, $childrenData)
    {
        if (is_array($childrenData)) {
            $nodeData = array_merge($nodeData, $childrenData);

            return $nodeData;
        }

        $nodeData = $childrenData;

        return $nodeData;
    }
private function mergeChildData($nodeData, $childrenData)
    {
        if (is_array($childrenData)) {
            $nodeData = array_merge($nodeData, $childrenData);

            return $nodeData;
        }

        $nodeData = $childrenData;

        return $nodeData;
    }
private function mergeChildData ( $ nodeData , $ childrenData ) { if ( is_array ( $ childrenData ) ) { $ nodeData = array_merge ( $ nodeData , $ childrenData ) ; return $ nodeData ; } $ nodeData = $ childrenData ; return $ nodeData ; }
Merge child node data into current node

@param array $nodeData     Current node data
@param array $childrenData The child node data

@return array
Merge child node data into current node