@@ -192,18 +192,18 @@ protected function _mergeNode(\DOMElement $node, $parentPath)
192
192
/* skip the case when the matched node has children, otherwise they get overridden */
193
193
if (!$ matchedNode ->hasChildNodes ()
194
194
|| $ this ->_isTextNode ($ matchedNode )
195
- || $ this ->_isCdataNode ($ matchedNode )
195
+ || $ this ->isCdataNode ($ matchedNode )
196
196
) {
197
197
$ matchedNode ->nodeValue = $ node ->childNodes ->item (0 )->nodeValue ;
198
198
}
199
- } elseif ($ this ->_isCdataNode ($ node ) && $ this ->_isTextNode ($ matchedNode )) {
199
+ } elseif ($ this ->isCdataNode ($ node ) && $ this ->_isTextNode ($ matchedNode )) {
200
200
/* Replace text node with CDATA section */
201
- if ($ this ->_findCdataSection ($ node )) {
202
- $ matchedNode ->nodeValue = $ this ->_findCdataSection ($ node )->nodeValue ;
201
+ if ($ this ->findCdataSection ($ node )) {
202
+ $ matchedNode ->nodeValue = $ this ->findCdataSection ($ node )->nodeValue ;
203
203
}
204
- } elseif ($ this ->_isCdataNode ($ node ) && $ this ->_isCdataNode ($ matchedNode )) {
204
+ } elseif ($ this ->isCdataNode ($ node ) && $ this ->isCdataNode ($ matchedNode )) {
205
205
/* Replace CDATA with new one */
206
- $ this ->_replaceCdataNode ($ matchedNode , $ node );
206
+ $ this ->replaceCdataNode ($ matchedNode , $ node );
207
207
} else {
208
208
/* recursive merge for all child nodes */
209
209
foreach ($ node ->childNodes as $ childNode ) {
@@ -237,7 +237,7 @@ protected function _isTextNode($node)
237
237
* @param \DOMNode $node
238
238
* @return bool
239
239
*/
240
- protected function _isCdataNode ($ node )
240
+ private function isCdataNode ($ node )
241
241
{
242
242
// If every child node of current is NOT \DOMElement
243
243
// It is arbitrary combination of text nodes and CDATA sections.
@@ -256,7 +256,7 @@ protected function _isCdataNode($node)
256
256
* @param \DOMNode $node
257
257
* @return \DOMCdataSection|null
258
258
*/
259
- protected function _findCdataSection ($ node )
259
+ private function findCdataSection ($ node )
260
260
{
261
261
foreach ($ node ->childNodes as $ childNode ) {
262
262
if ($ childNode instanceof \DOMCdataSection) {
@@ -271,10 +271,10 @@ protected function _findCdataSection($node)
271
271
* @param \DOMNode $oldNode
272
272
* @param \DOMNode $newNode
273
273
*/
274
- protected function _replaceCdataNode ($ oldNode , $ newNode )
274
+ private function replaceCdataNode ($ oldNode , $ newNode )
275
275
{
276
- $ oldCdata = $ this ->_findCdataSection ($ oldNode );
277
- $ newCdata = $ this ->_findCdataSection ($ newNode );
276
+ $ oldCdata = $ this ->findCdataSection ($ oldNode );
277
+ $ newCdata = $ this ->findCdataSection ($ newNode );
278
278
279
279
if ($ oldCdata && $ newCdata ) {
280
280
$ oldCdata ->nodeValue = $ newCdata ->nodeValue ;
0 commit comments