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

            return $nodeData;
        }

        $nodeData = $childrenData;

        return $nodeData;
    }