Skip to content

Commit 5d48710

Browse files
committed
make new methods private according to magento coding standards
1 parent 60d80ec commit 5d48710

File tree

1 file changed

+11
-11
lines changed
  • lib/internal/Magento/Framework/Config

1 file changed

+11
-11
lines changed

lib/internal/Magento/Framework/Config/Dom.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,18 @@ protected function _mergeNode(\DOMElement $node, $parentPath)
192192
/* skip the case when the matched node has children, otherwise they get overridden */
193193
if (!$matchedNode->hasChildNodes()
194194
|| $this->_isTextNode($matchedNode)
195-
|| $this->_isCdataNode($matchedNode)
195+
|| $this->isCdataNode($matchedNode)
196196
) {
197197
$matchedNode->nodeValue = $node->childNodes->item(0)->nodeValue;
198198
}
199-
} elseif ($this->_isCdataNode($node) && $this->_isTextNode($matchedNode)) {
199+
} elseif ($this->isCdataNode($node) && $this->_isTextNode($matchedNode)) {
200200
/* 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;
203203
}
204-
} elseif ($this->_isCdataNode($node) && $this->_isCdataNode($matchedNode)) {
204+
} elseif ($this->isCdataNode($node) && $this->isCdataNode($matchedNode)) {
205205
/* Replace CDATA with new one */
206-
$this->_replaceCdataNode($matchedNode, $node);
206+
$this->replaceCdataNode($matchedNode, $node);
207207
} else {
208208
/* recursive merge for all child nodes */
209209
foreach ($node->childNodes as $childNode) {
@@ -237,7 +237,7 @@ protected function _isTextNode($node)
237237
* @param \DOMNode $node
238238
* @return bool
239239
*/
240-
protected function _isCdataNode($node)
240+
private function isCdataNode($node)
241241
{
242242
// If every child node of current is NOT \DOMElement
243243
// It is arbitrary combination of text nodes and CDATA sections.
@@ -256,7 +256,7 @@ protected function _isCdataNode($node)
256256
* @param \DOMNode $node
257257
* @return \DOMCdataSection|null
258258
*/
259-
protected function _findCdataSection($node)
259+
private function findCdataSection($node)
260260
{
261261
foreach ($node->childNodes as $childNode) {
262262
if ($childNode instanceof \DOMCdataSection) {
@@ -271,10 +271,10 @@ protected function _findCdataSection($node)
271271
* @param \DOMNode $oldNode
272272
* @param \DOMNode $newNode
273273
*/
274-
protected function _replaceCdataNode($oldNode, $newNode)
274+
private function replaceCdataNode($oldNode, $newNode)
275275
{
276-
$oldCdata = $this->_findCdataSection($oldNode);
277-
$newCdata = $this->_findCdataSection($newNode);
276+
$oldCdata = $this->findCdataSection($oldNode);
277+
$newCdata = $this->findCdataSection($newNode);
278278

279279
if ($oldCdata && $newCdata) {
280280
$oldCdata->nodeValue = $newCdata->nodeValue;

0 commit comments

Comments
 (0)