|
4 | 4 | * See COPYING.txt for license details.
|
5 | 5 | */
|
6 | 6 |
|
7 |
| -// @codingStandardsIgnoreFile |
8 |
| - |
9 | 7 | /**
|
10 | 8 | * Magento configuration XML DOM utility
|
11 | 9 | */
|
@@ -120,7 +118,7 @@ public function __construct(
|
120 | 118 | /**
|
121 | 119 | * Retrieve array of xml errors
|
122 | 120 | *
|
123 |
| - * @param $errorFormat |
| 121 | + * @param string $errorFormat |
124 | 122 | * @return string[]
|
125 | 123 | */
|
126 | 124 | private static function getXmlErrors($errorFormat)
|
@@ -172,14 +170,14 @@ protected function _mergeNode(\DOMElement $node, $parentPath)
|
172 | 170 | if ($matchedNode) {
|
173 | 171 | //different node type
|
174 | 172 | if ($this->typeAttributeName && $node->hasAttribute(
|
175 |
| - $this->typeAttributeName |
176 |
| - ) && $matchedNode->hasAttribute( |
177 |
| - $this->typeAttributeName |
178 |
| - ) && $node->getAttribute( |
179 |
| - $this->typeAttributeName |
180 |
| - ) !== $matchedNode->getAttribute( |
181 |
| - $this->typeAttributeName |
182 |
| - ) |
| 173 | + $this->typeAttributeName |
| 174 | + ) && $matchedNode->hasAttribute( |
| 175 | + $this->typeAttributeName |
| 176 | + ) && $node->getAttribute( |
| 177 | + $this->typeAttributeName |
| 178 | + ) !== $matchedNode->getAttribute( |
| 179 | + $this->typeAttributeName |
| 180 | + ) |
183 | 181 | ) {
|
184 | 182 | $parentMatchedNode = $this->_getMatchedNode($parentPath);
|
185 | 183 | $newNode = $this->dom->importNode($node, true);
|
@@ -247,7 +245,7 @@ protected function _mergeAttributes($baseNode, $mergeNode)
|
247 | 245 | */
|
248 | 246 | protected function _getNodePathByParent(\DOMElement $node, $parentPath)
|
249 | 247 | {
|
250 |
| - $prefix = is_null($this->rootNamespace) ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; |
| 248 | + $prefix = $this->rootNamespace === null ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; |
251 | 249 | $path = $parentPath . '/' . $prefix . $node->tagName;
|
252 | 250 | $idAttribute = $this->nodeMergingConfig->getIdAttribute($path);
|
253 | 251 | if (is_array($idAttribute)) {
|
@@ -441,7 +439,7 @@ public function setSchemaFile($schemaFile)
|
441 | 439 | */
|
442 | 440 | private function _getAttributeName($attribute)
|
443 | 441 | {
|
444 |
| - if (!is_null($attribute->prefix) && !empty($attribute->prefix)) { |
| 442 | + if ($attribute->prefix !== null && !empty($attribute->prefix)) { |
445 | 443 | $attributeName = $attribute->prefix . ':' . $attribute->name;
|
446 | 444 | } else {
|
447 | 445 | $attributeName = $attribute->name;
|
|
0 commit comments