diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index 9c4dde0710c02..6e611e722e41b 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * Magento configuration XML DOM utility */ @@ -120,7 +118,7 @@ public function __construct( /** * Retrieve array of xml errors * - * @param $errorFormat + * @param string $errorFormat * @return string[] */ private static function getXmlErrors($errorFormat) @@ -171,15 +169,10 @@ protected function _mergeNode(\DOMElement $node, $parentPath) /* Update matched node attributes and value */ if ($matchedNode) { //different node type - if ($this->typeAttributeName && $node->hasAttribute( - $this->typeAttributeName - ) && $matchedNode->hasAttribute( - $this->typeAttributeName - ) && $node->getAttribute( - $this->typeAttributeName - ) !== $matchedNode->getAttribute( - $this->typeAttributeName - ) + if ($this->typeAttributeName && + $node->hasAttribute($this->typeAttributeName) && + $matchedNode->hasAttribute($this->typeAttributeName) && + $node->getAttribute($this->typeAttributeName) !== $matchedNode->getAttribute($this->typeAttributeName) ) { $parentMatchedNode = $this->_getMatchedNode($parentPath); $newNode = $this->dom->importNode($node, true); @@ -247,7 +240,7 @@ protected function _mergeAttributes($baseNode, $mergeNode) */ protected function _getNodePathByParent(\DOMElement $node, $parentPath) { - $prefix = is_null($this->rootNamespace) ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; + $prefix = $this->rootNamespace === null ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; $path = $parentPath . '/' . $prefix . $node->tagName; $idAttribute = $this->nodeMergingConfig->getIdAttribute($path); if (is_array($idAttribute)) { @@ -441,7 +434,7 @@ public function setSchemaFile($schemaFile) */ private function _getAttributeName($attribute) { - if (!is_null($attribute->prefix) && !empty($attribute->prefix)) { + if ($attribute->prefix !== null && !empty($attribute->prefix)) { $attributeName = $attribute->prefix . ':' . $attribute->name; } else { $attributeName = $attribute->name; diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php index 7a2e44462c590..7dccef0cc2aa3 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Config\Test\Unit\Composer; use \Magento\Framework\Config\Composer\Package; diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php index 648dd723d8a9f..1d7e685ac771a 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Config\Test\Unit; class DataTest extends \PHPUnit_Framework_TestCase { - /** + /** * @var \Magento\Framework\Config\ReaderInterface|\PHPUnit_Framework_MockObject_MockObject */ private $readerMock;